]> 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>
Wed, 17 Aug 2022 12:24:13 +0000 (14:24 +0200)
commitc4303b5288b790420d0133048f977e8077594172
tree4b521564f301405f27254827c541c1aa518a3f56
parent2c06c9aa6e0d1bde0036117cd6df34ba1b9a8023
powerpc/xive: Fix refcount leak in xive_get_max_prio

[ Upstream commit 2519653d9b718c6e2bcc1dda9febd948b0edfc1e ]

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