diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-12-29 11:47:05 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-12-29 11:47:05 +0200 |
commit | 3c506efd7e0f615bd9603ce8c06bc4a896952599 (patch) | |
tree | 6ebc840535e9d93bf60e21e940a5f4558275a89d /mm/slub.c | |
parent | fd37617e69fb865348d012eb1413aef0141ae2de (diff) | |
parent | 773ff60e841461cb1f9374a713ffcda029b8c317 (diff) | |
download | linux-3.10-3c506efd7e0f615bd9603ce8c06bc4a896952599.tar.gz linux-3.10-3c506efd7e0f615bd9603ce8c06bc4a896952599.tar.bz2 linux-3.10-3c506efd7e0f615bd9603ce8c06bc4a896952599.zip |
Merge branch 'topic/failslab' into for-linus
Conflicts:
mm/slub.c
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c index ca95e45f04c..6cb7ad10785 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -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; |