Subject: mm: enables booting a NUMA system where some nodes have no memory From: Christian Krafft When booting a NUMA system with nodes that have no memory (eg by limiting memory), bootmem_alloc_core tried to find pages in an uninitialized bootmem_map. This caused a null pointer access. This fix adds a check, so that NULL is returned. That will enable the caller (bootmem_alloc_nopanic) to alloc memory on other without a panic. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann Index: linux-2.6/mm/bootmem.c =================================================================== --- linux-2.6.orig/mm/bootmem.c +++ linux-2.6/mm/bootmem.c @@ -198,6 +198,10 @@ __alloc_bootmem_core(struct bootmem_data if (!bdata->node_bootmem_map) return NULL; + /* on nodes without memory - bootmem_map is NULL */ + if(!bdata->node_bootmem_map) + return NULL; + end_pfn = bdata->node_low_pfn; limit = PFN_DOWN(limit); if (limit && end_pfn > limit)