From 43bb7a3a050adbfa31befe0d89db6606fb5141df Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 2 Feb 2003 06:08:03 -0800 Subject: [PATCH] slab IRQ fix Patch from Manfred Spraul cache_alloc_refill() forgets to disable interrupts again on an error path. This exposes us to slab corruption and it makes slab debugging go BUG (it expects local irqs to be disabled). --- mm/slab.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/slab.c b/mm/slab.c index e99393f94e7d..5fa3a4c6862d 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1419,6 +1419,8 @@ static int cache_grow (kmem_cache_t * cachep, int flags) opps1: kmem_freepages(cachep, objp); failed: + if (local_flags & __GFP_WAIT) + local_irq_disable(); return 0; } -- cgit v1.2.3