x86: check boundary in setup_node_bootmem()
authorYinghai Lu <yinghai@kernel.org>
Wed, 22 Apr 2009 21:19:27 +0000 (14:19 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 23 Apr 2009 07:58:56 +0000 (09:58 +0200)
Commit dc09855 ("x86/uv: fix init of memory-less nodes") causes a
two sockets system (where node-1 doesn't have RAM installed) to crash.

That commit makes node_possible include cpu nodes that do not have memory.
So check boundary in setup_node_bootmem().

[ Impact: fix boot crash on RAM-less NUMA node system ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Jack Steiner <steiner@sgi.com>
LKML-Reference: <49EF89DF.9090404@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/numa_64.c

index d73aaa8923716b374970f45781251c249c855172..2d05a12029dc3d216814eb2a9e914b389014407a 100644 (file)
@@ -188,6 +188,9 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
        const int pgdat_size = roundup(sizeof(pg_data_t), PAGE_SIZE);
        int nid;
 
+       if (!end)
+               return;
+
        start = roundup(start, ZONE_ALIGN);
 
        printk(KERN_INFO "Bootmem setup node %d %016lx-%016lx\n", nodeid,