From: Christoph Lameter Sorry I screwed up the comparison. It is only an error if we attempt to allocate a slab larger than the maximum allowed size. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton --- include/linux/slub_def.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN include/linux/slub_def.h~slub-it-is-legit-to-allocate-a-slab-of-the-maximum-permitted-size include/linux/slub_def.h --- a/include/linux/slub_def.h~slub-it-is-legit-to-allocate-a-slab-of-the-maximum-permitted-size +++ a/include/linux/slub_def.h @@ -88,7 +88,7 @@ static inline int kmalloc_index(int size */ WARN_ON_ONCE(size == 0); - if (size >= (1 << KMALLOC_SHIFT_HIGH)) + if (size > (1 << KMALLOC_SHIFT_HIGH)) return -1; if (size > 64 && size <= 96) _