summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2018-11-27 19:16:44 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 15:34:52 +0100
commite7c9ddae1352fcf342135b30c670cbb416c3b9eb (patch)
treec7d967a8ad50d4e325d3a01d2dd5b4475b20e5f8 /arch/powerpc/platforms
parentf2f645667e785474834de678ceb0ddeac3f3f88c (diff)
powerpc/pseries: Fix node leak in update_lmb_associativity_index()
[ Upstream commit 47918bc68b7427e961035949cc1501a864578a69 ] In update_lmb_associativity_index() we lookup dr_node using of_find_node_by_path() which takes a reference for us. In the non-error case we forget to drop the reference. Note that find_aa_index() does modify properties of the node, but doesn't need an extra reference held once it's returned. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index 656bbbd731d0..6c12b02f4a61 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -294,6 +294,7 @@ static u32 lookup_lmb_associativity_index(struct of_drconf_cell *lmb)
aa_index = find_aa_index(dr_node, ala_prop, lmb_assoc);
+ of_node_put(dr_node);
dlpar_free_cc_nodes(lmb_node);
return aa_index;
}