]> git.baikalelectronics.ru Git - kernel.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>
Thu, 25 Aug 2022 09:18:07 +0000 (11:18 +0200)
commita8d7996603b109d9e065ad12414651cbf9ebb1a3
tree3744c27312a0ebb55f1003fdf2b195040e2bc364
parent32bcc01f288fffe622f1576afe5060a3e6a45b2f
powerpc/xive: Fix refcount leak in xive_get_max_prio

[ Upstream commit 5e535f31f664bca8be5fc2b563230adedddd9797 ]

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: fbd2c5a388dd ("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