]> git.baikalelectronics.ru Git - kernel.git/commit
uml: fix mm_context memory leak
authorJeff Dike <jdike@addtoit.com>
Fri, 8 Feb 2008 12:22:11 +0000 (04:22 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:22:43 +0000 (09:22 -0800)
commitcc7668b5dce2a401c85952078c6da22ca122b74f
tree2bebff50071f9f9fef802d2434de951e9c235332
parent905869aee3dbc8f0951ac582adf1c075e6f0640d
uml: fix mm_context memory leak

[ Spotted by Miklos ]

Fix a memory leak in init_new_context.  The struct page ** buffer allocated
for install_special_mapping was never recorded, and thus leaked when the
mm_struct was freed.  Fix it by saving the pointer in mm_context_t and freeing
it in arch_exit_mmap.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/include/um_mmu.h
arch/um/kernel/skas/mmu.c