Patch "powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader" has been added to the 4.14-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

    powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader

to the 4.14-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:
     powerpc-spufs-fix-refcount-leak-in-spufs_init_isolat.patch
and it can be found in the queue-4.14 subdirectory.

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



commit 4b49e07de2b1b8063cf16320cd31812aa7e34e4c
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Fri Jun 3 16:15:42 2022 +0400

    powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader
    
    [ Upstream commit 6ac059dacffa8ab2f7798f20e4bd3333890c541c ]
    
    of_find_node_by_path() returns remote device nodepointer with
    refcount incremented, we should use of_node_put() on it when done.
    Add missing of_node_put() to avoid refcount leak.
    
    Fixes: 0afacde3df4c ("[POWERPC] spufs: allow isolated mode apps by starting the SPE loader")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220603121543.22884-1-linmq006@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 9558d725a99b..37ba89f2fd80 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -684,6 +684,7 @@ spufs_init_isolated_loader(void)
 		return;
 
 	loader = of_get_property(dn, "loader", &size);
+	of_node_put(dn);
 	if (!loader)
 		return;
 



[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