]> git.baikalelectronics.ru Git - kernel.git/commit
slub: Potential stack overflow
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 24 Mar 2010 21:25:47 +0000 (22:25 +0100)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sat, 22 May 2010 07:57:30 +0000 (10:57 +0300)
commitc41dda38152977108c23144f28f5727d6c6ff4ca
tree9b16ed244e0bd0b71a1d3d6e662be310f1e8f9c2
parentc0a2e59e684cc5b4233a18f95bde7bf67f004e88
slub: Potential stack overflow

I discovered that we can overflow stack if CONFIG_SLUB_DEBUG=y and use slabs
with many objects, since list_slab_objects() and process_slab() use
DECLARE_BITMAP(map, page->objects).

With 65535 bits, we use 8192 bytes of stack ...

Switch these allocations to dynamic allocations.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slub.c