diff options
author | Nathan Lynch <nathanl@linux.ibm.com> | 2019-09-20 02:16:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-19 09:26:49 +0300 |
commit | 3e444bad470ead7f965d34f351e3b44ff214b6b4 (patch) | |
tree | 75ecf50d1192379153f59311c3a2117b3324eae3 /tools/testing | |
parent | c2ff56c528463ca2259132ccfcb8ee7d4ff22f87 (diff) | |
download | linux-3e444bad470ead7f965d34f351e3b44ff214b6b4.tar.xz |
powerpc/pseries/hotplug-cpu: Remove double free in error path
[ Upstream commit a0ff72f9f5a780341e7ff5e9ba50a0dad5fa1980 ]
In the unlikely event that the device tree lacks a /cpus node,
find_dlpar_cpus_to_add() oddly frees the cpu_drcs buffer it has been
passed before returning an error. Its only caller also frees the
buffer on error.
Remove the less conventional kfree() of a caller-supplied buffer from
find_dlpar_cpus_to_add().
Fixes: 90edf184b9b7 ("powerpc/pseries: Add CPU dlpar add functionality")
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190919231633.1344-1-nathanl@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions