summaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2006-03-25 12:06:47 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 17:22:50 +0100
commit0718dc2a82c865ca75975acabaf984057f9fd488 (patch)
tree0f7e8ed22ea26c79e17712c417593bdce04e7888 /mm/mempolicy.c
parent[PATCH] alloc_kmemlist: Some cleanup in preparation for a real memory leak fix (diff)
downloadlinux-0718dc2a82c865ca75975acabaf984057f9fd488.tar.xz
linux-0718dc2a82c865ca75975acabaf984057f9fd488.zip
[PATCH] slab: fix memory leak in alloc_kmemlist
We have had this memory leak for a while now. The situation is complicated by the use of alloc_kmemlist() as a function to resize various caches by do_tune_cpucache(). What we do here is first of all make sure that we deallocate properly in the loop over all the nodes. If we are just resizing caches then we can simply return with -ENOMEM if an allocation fails. If the cache is new then we need to rollback and remove all earlier allocations. We detect that a cache is new by checking if the link to the global cache chain has been setup. This is a bit hackish .... (also fix up too overlong lines that I added in the last patch...) Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/mempolicy.c')
0 files changed, 0 insertions, 0 deletions