提交 021428ad 编写于 作者: Y Yinghai Lu 提交者: Ingo Molnar

x86, numa, bootmem: Only free bootmem on NUMA failure path

In the NUMA bootmem setup failure path we freed nodedata_phys
incorrectly.
Signed-off-by: NYinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4B07A739.3030104@kernel.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 44280733
......@@ -239,8 +239,14 @@ setup_node_bootmem(int nodeid, unsigned long start, unsigned long end)
bootmap = early_node_mem(nodeid, bootmap_start, end,
bootmap_pages<<PAGE_SHIFT, PAGE_SIZE);
if (bootmap == NULL) {
if (nodedata_phys < start || nodedata_phys >= end)
free_bootmem(nodedata_phys, pgdat_size);
if (nodedata_phys < start || nodedata_phys >= end) {
/*
* only need to free it if it is from other node
* bootmem
*/
if (nid != nodeid)
free_bootmem(nodedata_phys, pgdat_size);
}
node_data[nodeid] = NULL;
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册