]> git.baikalelectronics.ru Git - kernel.git/commit
SLOB: fix bogus ksize calculation
authorMatt Mackall <mpm@selenic.com>
Tue, 7 Oct 2008 16:37:35 +0000 (11:37 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Oct 2008 18:19:23 +0000 (11:19 -0700)
commit33210e60537659eb08ad61e32a411dca85d1e599
tree08b988ee8ebae30f31830801a44a62e0eec4856e
parent952f83ad56f30b80c56c9473dff3172118d0a61a
SLOB: fix bogus ksize calculation

SLOB's ksize calculation was braindamaged and generally harmlessly
underreported the allocation size. But for very small buffers, it could
in fact overreport them, leading code depending on krealloc to overrun
the allocation and trample other data.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Tested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slob.c