Merge branch 'topic/failslab' into for-linus
Conflicts: mm/slub.c Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/memory.h>
|
||||
#include <linux/math64.h>
|
||||
#include <linux/fault-inject.h>
|
||||
|
||||
/*
|
||||
* Lock order:
|
||||
@@ -1596,6 +1597,10 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
|
||||
unsigned int objsize;
|
||||
|
||||
might_sleep_if(gfpflags & __GFP_WAIT);
|
||||
|
||||
if (should_failslab(s->objsize, gfpflags))
|
||||
return NULL;
|
||||
|
||||
local_irq_save(flags);
|
||||
c = get_cpu_slab(s, smp_processor_id());
|
||||
objsize = c->objsize;
|
||||
|
Reference in New Issue
Block a user