mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-27 18:00:48 +07:00
Revert "powerpc/pseries/hotplug-cpu: Remove double free in error path"
[ Upstream commit a40fdaf1420d6e6bda0dd2df1e6806013e58dbe1 ] This reverts commita0ff72f9f5
. Since the commitb015f6bc95
("powerpc/pseries: Add cpu DLPAR support for drc-info property"), the 'cpu_drcs' wouldn't be double freed when the 'cpus' node not found. So we needn't apply this patch, otherwise, the memory will be leaked. Fixes:a0ff72f9f5
("powerpc/pseries/hotplug-cpu: Remove double free in error path") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com> [mpe: Caused by me applying a patch to a function that had changed in the interim] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201111020752.1686139-1-zhangxiaoxu5@huawei.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a063e3faa3
commit
02cf67c9b6
@ -746,6 +746,7 @@ static int dlpar_cpu_add_by_count(u32 cpus_to_add)
|
||||
parent = of_find_node_by_path("/cpus");
|
||||
if (!parent) {
|
||||
pr_warn("Could not find CPU root node in device tree\n");
|
||||
kfree(cpu_drcs);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user