Patch "fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()" has been added to the 5.10-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

    fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()

to the 5.10-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:
     fbdev-omapfb-fix-an-of-node-leak-in-dss_of_port_get_.patch
and it can be found in the queue-5.10 subdirectory.

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



commit eccab193b9fda61f532cca14f0eeec3054420b36
Author: Joe Hattori <joe@xxxxxxxxxxxxxxxxxxxxx>
Date:   Wed Jan 8 10:15:37 2025 +0900

    fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()
    
    [ Upstream commit de124b61e179e690277116e6be512e4f422b5dd8 ]
    
    dss_of_port_get_parent_device() leaks an OF node reference when i >= 2
    and struct device_node *np is present. Since of_get_next_parent()
    obtains a reference of the returned OF node, call of_node_put() before
    returning NULL.
    
    This was found by an experimental verifier that I am developing, and no
    runtime test was able to be performed due to that lack of actual
    devices.
    
    Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
    Signed-off-by: Joe Hattori <joe@xxxxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
    Signed-off-by: Helge Deller <deller@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
index 0282d4eef139d..3b16c3342cb77 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
@@ -102,6 +102,7 @@ struct device_node *dss_of_port_get_parent_device(struct device_node *port)
 		np = of_get_next_parent(np);
 	}
 
+	of_node_put(np);
 	return NULL;
 }
 




[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