]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/pseries: Fix node leak in update_lmb_associativity_index()
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Nov 2018 08:16:44 +0000 (19:16 +1100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:35 +0000 (14:21 -0300)
commitaa4feea3427d4d133c1443295ff3858660a44774
tree58a72b56add3a0db6d8f7ca879d297272c374486
parent6baafcc965e57df46386eabe7995a2005072acb5
powerpc/pseries: Fix node leak in update_lmb_associativity_index()

BugLink: https://bugs.launchpad.net/bugs/1855787
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/powerpc/platforms/pseries/hotplug-memory.c