mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader
[ Upstream commit6ac059dacf] 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:0afacde3df("[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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
50e7896c8e
commit
85aff6a9b7
|
|
@ -664,6 +664,7 @@ spufs_init_isolated_loader(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
loader = of_get_property(dn, "loader", &size);
|
loader = of_get_property(dn, "loader", &size);
|
||||||
|
of_node_put(dn);
|
||||||
if (!loader)
|
if (!loader)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user