Searched hist:"92 d585ef" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/base/ |
H A D | node.c | 92d585ef Thu Mar 06 03:18:21 CST 2014 Xishi Qiu <qiuxishi@huawei.com> numa: fix NULL pointer access and memory leak in unregister_one_node()
When doing socket hot remove, "node_devices[nid]" is set to NULL; acpi_processor_remove() try_offline_node() unregister_one_node()
Then hot add a socket, but do not echo 1 > /sys/devices/system/cpu/cpuXX/online, so register_one_node() will not be called, and "node_devices[nid]" is still NULL.
If doing socket hot remove again, NULL pointer access will be happen. unregister_one_node() unregister_node()
Another, we should free the memory used by "node_devices[nid]" in unregister_one_node().
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 92d585ef Thu Mar 06 03:18:21 CST 2014 Xishi Qiu <qiuxishi@huawei.com> numa: fix NULL pointer access and memory leak in unregister_one_node() When doing socket hot remove, "node_devices[nid]" is set to NULL; acpi_processor_remove() try_offline_node() unregister_one_node() Then hot add a socket, but do not echo 1 > /sys/devices/system/cpu/cpuXX/online, so register_one_node() will not be called, and "node_devices[nid]" is still NULL. If doing socket hot remove again, NULL pointer access will be happen. unregister_one_node() unregister_node() Another, we should free the memory used by "node_devices[nid]" in unregister_one_node(). Signed-off-by: Xishi Qiu <qiuxishi@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|