Re: [PATCH 2/3] powerpc/pseries/hotplug-cpu: fix memleak in dlpar_cpu_add_by_count

2020-11-29 Thread Qinglang Miao
在 2020/11/30 9:51, Michael Ellerman 写道: Qinglang Miao writes: kfree(cpu_drcs) should be called when it fails to perform of_find_node_by_path("/cpus") in dlpar_cpu_add_by_count, otherwise there would be a memleak. In fact, the patch a0ff72f9f5a7 ought to remove kfree in

Re: [PATCH 2/3] powerpc/pseries/hotplug-cpu: fix memleak in dlpar_cpu_add_by_count

2020-11-29 Thread Michael Ellerman
Qinglang Miao writes: > kfree(cpu_drcs) should be called when it fails to perform > of_find_node_by_path("/cpus") in dlpar_cpu_add_by_count, > otherwise there would be a memleak. > > In fact, the patch a0ff72f9f5a7 ought to remove kfree in > find_dlpar_cpus_to_add rather than

[PATCH 2/3] powerpc/pseries/hotplug-cpu: fix memleak in dlpar_cpu_add_by_count

2020-11-28 Thread Qinglang Miao
kfree(cpu_drcs) should be called when it fails to perform of_find_node_by_path("/cpus") in dlpar_cpu_add_by_count, otherwise there would be a memleak. In fact, the patch a0ff72f9f5a7 ought to remove kfree in find_dlpar_cpus_to_add rather than dlpar_cpu_add_by_count. I guess there might be a