From: Christoph Lameter Date: Wed, 16 May 2007 06:57:03 +0000 (-0700) Subject: SLUB: It is legit to allocate a slab of the maximum permitted size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1abd727ed7abf5c19e7d1760671475cbecbccb0e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git SLUB: It is legit to allocate a slab of the maximum permitted size 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 Signed-off-by: Linus Torvalds --- diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index fd6627e2d115..c6c1f4a120e3 100644 --- a/include/linux/slub_def.h +++ b/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)