Commit 43bb7a3a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] slab IRQ fix

Patch from Manfred Spraul <manfred@colorfullife.com>

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).
parent 4a369121
...@@ -1419,6 +1419,8 @@ static int cache_grow (kmem_cache_t * cachep, int flags) ...@@ -1419,6 +1419,8 @@ static int cache_grow (kmem_cache_t * cachep, int flags)
opps1: opps1:
kmem_freepages(cachep, objp); kmem_freepages(cachep, objp);
failed: failed:
if (local_flags & __GFP_WAIT)
local_irq_disable();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment