Skip to content

Commit

Permalink
powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Yuuoniy authored and mpe committed Aug 1, 2022
1 parent 8c9f37a commit 6ac059d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ spufs_init_isolated_loader(void)
return;

loader = of_get_property(dn, "loader", &size);
of_node_put(dn);
if (!loader)
return;

Expand Down

0 comments on commit 6ac059d

Please sign in to comment.