aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 2f0e7d5976cb..c5d352e73d81 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -373,6 +373,9 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
373{ 373{
374 int index; 374 int index;
375 375
376 if (WARN_ON_ONCE(size > KMALLOC_MAX_SIZE))
377 return NULL;
378
376 if (size <= 192) { 379 if (size <= 192) {
377 if (!size) 380 if (!size)
378 return ZERO_SIZE_PTR; 381 return ZERO_SIZE_PTR;