]> git.baikalelectronics.ru Git - kernel.git/commit
SLUB: Fix memory leak by not reusing cpu_slab
authorChristoph Lameter <clameter@sgi.com>
Mon, 5 Nov 2007 19:31:58 +0000 (11:31 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 5 Nov 2007 19:37:12 +0000 (11:37 -0800)
commitfc7f31d0f33330a22acf85d391d20e36aa836834
tree3522f909f91e14b86e8dc0cedcb8e17bc0901bbe
parentadaaf3219ab3c36bff8c8445f90fbd18419cc11b
SLUB: Fix memory leak by not reusing cpu_slab

Fix the memory leak that may occur when we attempt to reuse a cpu_slab
that was allocated while we reenabled interrupts in order to be able to
grow a slab cache.

The per cpu freelist may contain objects and in that situation we may
overwrite the per cpu freelist pointer loosing objects.  This only
occurs if we find that the concurrently allocated slab fits our
allocation needs.

If we simply always deactivate the slab then the freelist will be
properly reintegrated and the memory leak will go away.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c