Subject: SLUB: Do not fail on broken memory configurations From: Christoph Lameter Print a big fat warning and do what is necessary to continue if a node is marked as up but allocations from the node do not succeed. Signed-off-by: Christoph Lameter Signed-off-by: Arnd Bergmann Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c +++ linux-2.6/mm/slub.c @@ -1797,9 +1797,16 @@ static struct kmem_cache_node * __init e BUG_ON(kmalloc_caches->size < sizeof(struct kmem_cache_node)); - page = new_slab(kmalloc_caches, gfpflags | GFP_THISNODE, node); - + page = new_slab(kmalloc_caches, gfpflags, node); BUG_ON(!page); + + if (page_to_nid(page) != node) { + printk(KERN_ERR "SLUB: Unable to allocate memory from " + "node %d\n", node); + printk(KERN_ERR "SLUB: Allocating a useless per node structure" + " in order to be able to continue\n"); + } + n = page->freelist; BUG_ON(!n); page->freelist = get_freepointer(kmalloc_caches, n);