]> git.baikalelectronics.ru Git - kernel.git/commit
slub: fix ksize() for zero-sized pointers
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 20:21:34 +0000 (13:21 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 20:21:34 +0000 (13:21 -0700)
commit87bd5c6695a37eb614981a7d9bc6d86d2fb550a6
treed5e57db2bfd773611e2b77b4bbe6d89ba8449b45
parent5fea7fa29e485a7a9256b130671a62c0a78622b1
slub: fix ksize() for zero-sized pointers

The slab and slob allocators already did this right, but slub would call
"get_object_page()" on the magic ZERO_SIZE_PTR, with all kinds of nasty
end results.

Noted by Ingo Molnar.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c