提交 0743985a 编写于 作者: M Michael Ellerman 提交者: Xie XiuQi

powerpc/pseries: Fix node leak in update_lmb_associativity_index()

[ Upstream commit 47918bc6 ]

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: NMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 7602e829
...@@ -202,6 +202,7 @@ static int update_lmb_associativity_index(struct drmem_lmb *lmb) ...@@ -202,6 +202,7 @@ static int update_lmb_associativity_index(struct drmem_lmb *lmb)
aa_index = find_aa_index(dr_node, ala_prop, lmb_assoc); aa_index = find_aa_index(dr_node, ala_prop, lmb_assoc);
of_node_put(dr_node);
dlpar_free_cc_nodes(lmb_node); dlpar_free_cc_nodes(lmb_node);
if (aa_index < 0) { if (aa_index < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册