diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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: |
@@ -1591,6 +1592,9 @@ static __always_inline void *slab_alloc(struct kmem_cache *s, | |||
1591 | unsigned long flags; | 1592 | unsigned long flags; |
1592 | unsigned int objsize; | 1593 | unsigned int objsize; |
1593 | 1594 | ||
1595 | if (should_failslab(s->objsize, gfpflags)) | ||
1596 | return NULL; | ||
1597 | |||
1594 | local_irq_save(flags); | 1598 | local_irq_save(flags); |
1595 | c = get_cpu_slab(s, smp_processor_id()); | 1599 | c = get_cpu_slab(s, smp_processor_id()); |
1596 | objsize = c->objsize; | 1600 | objsize = c->objsize; |