Patch "interconnect: core: fix error return code of icc_link_destroy()" has been added to the 5.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    interconnect: core: fix error return code of icc_link_destroy()

to the 5.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     interconnect-core-fix-error-return-code-of-icc_link_.patch
and it can be found in the queue-5.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8c0135dff7ec5751062fadf4a3c9da4726086e96
Author: Jia-Ju Bai <baijiaju1990@xxxxxxxxx>
Date:   Mon Mar 8 15:09:15 2021 +0200

    interconnect: core: fix error return code of icc_link_destroy()
    
    [ Upstream commit 715ea61532e731c62392221238906704e63d75b6 ]
    
    When krealloc() fails and new is NULL, no error return code of
    icc_link_destroy() is assigned.
    To fix this bug, ret is assigned with -ENOMEM hen new is NULL.
    
    Reported-by: TOTE Robot <oslab@xxxxxxxxxxxxxxx>
    Signed-off-by: Jia-Ju Bai <baijiaju1990@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20210306132857.17020-1-baijiaju1990@xxxxxxxxx
    Signed-off-by: Georgi Djakov <georgi.djakov@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 5ad519c9f239..8a1e70e00876 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -942,6 +942,8 @@ int icc_link_destroy(struct icc_node *src, struct icc_node *dst)
 		       GFP_KERNEL);
 	if (new)
 		src->links = new;
+	else
+		ret = -ENOMEM;
 
 out:
 	mutex_unlock(&icc_lock);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux