]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
SLUB: Fix memory leak by not reusing cpu_slab
authorChristoph Lameter <clameter@sgi.com>
Mon, 5 Nov 2007 19:15:43 +0000 (11:15 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Nov 2007 16:12:43 +0000 (08:12 -0800)
commitf8b98ff93bba351932c1acfc75435fe7bfe48294
treedf666f07bf8e8e50a1becb7413e665a95da9376a
parent0ebc8ca802af6a8b6c5d311a4a7250aa5d7d3625
SLUB: Fix memory leak by not reusing cpu_slab

patch 05aa345034de6ae9c77fb93f6a796013641d57d5 in mainline.

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>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/slub.c