Do not enable and disable interrupts if we were called with interrupts enabled. Signed-off-by: Christoph Lameter <cl@xxxxxxxxx> --- mm/slub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2011-11-09 11:11:45.341673526 -0600 +++ linux-2.6/mm/slub.c 2011-11-09 11:11:48.831693571 -0600 @@ -1279,10 +1279,11 @@ static struct page *allocate_slab(struct struct page *page; struct kmem_cache_order_objects oo = s->oo; gfp_t alloc_gfp; + int irqs_were_disabled = irqs_disabled(); flags &= gfp_allowed_mask; - if (flags & __GFP_WAIT) + if (irqs_were_disabled && flags & __GFP_WAIT) local_irq_enable(); flags |= s->allocflags; @@ -1306,7 +1307,7 @@ static struct page *allocate_slab(struct stat(s, ORDER_FALLBACK); } - if (flags & __GFP_WAIT) + if (irqs_were_disabled && flags & __GFP_WAIT) local_irq_disable(); if (!page) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>