Skip to content

Commit

Permalink
SLUB: It is legit to allocate a slab of the maximum permitted size
Browse files Browse the repository at this point in the history
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 <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed May 17, 2007
1 parent faab83b commit 1abd727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/slub_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1abd727

Please sign in to comment.