Patch "firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()" has been added to the 6.1-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

    firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()

to the 6.1-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:
     firmware-tegra-bpmp-return-directly-after-a-failed-k.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 1d940913112e7d73579abcbc9d036f2120dbf8e7
Author: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date:   Mon Dec 25 20:03:56 2023 +0100

    firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()
    
    [ Upstream commit 1315848f1f8a0100cb6f8a7187bc320c5d98947f ]
    
    The kfree() function was called in one case by
    the get_filename() function during error handling
    even if the passed variable contained a null pointer.
    This issue was detected by using the Coccinelle software.
    
    Thus return directly after a call of the function “kzalloc” failed
    at the beginning.
    
    Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c
index 9d3874cdaaeef..34e4152477f3b 100644
--- a/drivers/firmware/tegra/bpmp-debugfs.c
+++ b/drivers/firmware/tegra/bpmp-debugfs.c
@@ -81,7 +81,7 @@ static const char *get_filename(struct tegra_bpmp *bpmp,
 
 	root_path_buf = kzalloc(root_path_buf_len, GFP_KERNEL);
 	if (!root_path_buf)
-		goto out;
+		return NULL;
 
 	root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf,
 				root_path_buf_len);




[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