diff --git a/mm/bootmem.c b/mm/bootmem.c index d53112fcb4040a3a2ecf930e013eb9933bc6d34f..94253428f0913c016a7dee75d1e68a68fbe87ddc 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -196,6 +196,10 @@ __alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size, if (limit && bdata->node_boot_start >= limit) 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)