Patch "watchdog: rti_wdt: Fix an OF node leak in rti_wdt_probe()" has been added to the 6.12-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

    watchdog: rti_wdt: Fix an OF node leak in rti_wdt_probe()

to the 6.12-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:
     watchdog-rti_wdt-fix-an-of-node-leak-in-rti_wdt_prob.patch
and it can be found in the queue-6.12 subdirectory.

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



commit 904c1fa95432f9c9976efd9540a6090d62c49f2f
Author: Joe Hattori <joe@xxxxxxxxxxxxxxxxxxxxx>
Date:   Sun Jan 5 20:17:18 2025 +0900

    watchdog: rti_wdt: Fix an OF node leak in rti_wdt_probe()
    
    [ Upstream commit 143981aa63f33d469a55a55fd9fb81cd90109672 ]
    
    rti_wdt_probe() does not release the OF node reference obtained by
    of_parse_phandle(). Add a of_node_put() call.
    
    This was found by an experimental verification tool that I am
    developing. Due to the lack of the actual device, no runtime test was
    able to be performed.
    
    Fixes: f20ca595ae23 ("watchdog:rit_wdt: Add support for WDIOF_CARDRESET")
    Signed-off-by: Joe Hattori <joe@xxxxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20250105111718.4184192-1-joe@xxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
index 563d842014dfb..cc239251e1938 100644
--- a/drivers/watchdog/rti_wdt.c
+++ b/drivers/watchdog/rti_wdt.c
@@ -301,6 +301,7 @@ static int rti_wdt_probe(struct platform_device *pdev)
 	node = of_parse_phandle(pdev->dev.of_node, "memory-region", 0);
 	if (node) {
 		ret = of_address_to_resource(node, 0, &res);
+		of_node_put(node);
 		if (ret) {
 			dev_err(dev, "No memory address assigned to the region.\n");
 			goto err_iomap;




[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