Skip to content

Commit 6ac059d

Browse files
Yuuoniympe
authored andcommitted
powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader
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: 0afacde ("[POWERPC] spufs: allow isolated mode apps by starting the SPE loader") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220603121543.22884-1-linmq006@gmail.com
1 parent 8c9f37a commit 6ac059d

File tree

1 file changed

+1
-0
lines changed
  • arch/powerpc/platforms/cell/spufs

1 file changed

+1
-0
lines changed

arch/powerpc/platforms/cell/spufs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ spufs_init_isolated_loader(void)
660660
return;
661661

662662
loader = of_get_property(dn, "loader", &size);
663+
of_node_put(dn);
663664
if (!loader)
664665
return;
665666

0 commit comments

Comments
 (0)