]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/xive: Fix refcount leak in xive_get_max_prio
authorMiaoqian Lin <linmq006@gmail.com>
Sun, 5 Jun 2022 05:32:23 +0000 (09:32 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:16:11 +0000 (15:16 +0200)
commit6d1e53f7f181a11a8a343def1e0d0209905b7c64
tree4836fd8f6948e9dace99b3f0b7eba30938986f79
parent85aff6a9b7b7ec4e5c319f7946c9864c8d5e3d4a
powerpc/xive: Fix refcount leak in xive_get_max_prio

[ Upstream commit 255b650cbec6849443ce2e0cdd187fd5e61c218c ]

of_find_node_by_path() returns a node pointer with
refcount incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220605053225.56125-1-linmq006@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/sysdev/xive/spapr.c