From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH AUTOSEL 4.9 58/91] powerpc/pseries: Fix node leak in update_lmb_associativity_index()
Date: Fri, 22 Nov 2019 01:00:56 -0500 [thread overview]
Message-ID: <20191122060129.4239-57-sashal@kernel.org> (raw)
In-Reply-To: <20191122060129.4239-1-sashal@kernel.org>
From: Michael Ellerman <mpe@ellerman.id.au>
[ 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>
---
arch/powerpc/platforms/pseries/hotplug-memory.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index c0a0947f43bbb..e65ef3067afb5 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;
}
--
2.20.1
next prev parent reply other threads:[~2019-11-22 7:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191122060129.4239-1-sashal@kernel.org>
2019-11-22 6:00 ` [PATCH AUTOSEL 4.9 37/91] powerpc/book3s/32: fix number of bats in p/v_block_mapped() Sasha Levin
2019-11-22 6:00 ` [PATCH AUTOSEL 4.9 38/91] powerpc/xmon: fix dump_segments() Sasha Levin
2019-11-22 6:00 ` [PATCH AUTOSEL 4.9 47/91] powerpc/prom: fix early DEBUG messages Sasha Levin
2019-11-22 6:00 ` [PATCH AUTOSEL 4.9 48/91] powerpc/mm: Make NULL pointer deferences explicit on bad page faults Sasha Levin
2019-11-22 6:00 ` [PATCH AUTOSEL 4.9 49/91] powerpc/44x/bamboo: Fix PCI range Sasha Levin
2019-11-22 6:00 ` [PATCH AUTOSEL 4.9 51/91] powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status Sasha Levin
2019-11-22 6:00 ` [PATCH AUTOSEL 4.9 57/91] powerpc/83xx: handle machine check caused by watchdog timer Sasha Levin
2019-11-22 6:00 ` Sasha Levin [this message]
2019-11-22 6:01 ` [PATCH AUTOSEL 4.9 67/91] net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe() Sasha Levin
2019-11-22 6:01 ` [PATCH AUTOSEL 4.9 90/91] powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property() Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191122060129.4239-57-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).