aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index ca95e45f04c3..6cb7ad107852 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -24,6 +24,7 @@
24#include <linux/kallsyms.h> 24#include <linux/kallsyms.h>
25#include <linux/memory.h> 25#include <linux/memory.h>
26#include <linux/math64.h> 26#include <linux/math64.h>
27#include <linux/fault-inject.h>
27 28
28/* 29/*
29 * Lock order: 30 * Lock order:
@@ -1596,6 +1597,10 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
1596 unsigned int objsize; 1597 unsigned int objsize;
1597 1598
1598 might_sleep_if(gfpflags & __GFP_WAIT); 1599 might_sleep_if(gfpflags & __GFP_WAIT);
1600
1601 if (should_failslab(s->objsize, gfpflags))
1602 return NULL;
1603
1599 local_irq_save(flags); 1604 local_irq_save(flags);
1600 c = get_cpu_slab(s, smp_processor_id()); 1605 c = get_cpu_slab(s, smp_processor_id());
1601 objsize = c->objsize; 1606 objsize = c->objsize;