diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-02-08 07:22:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:43 -0500 |
commit | ac2a659968f5318a180213f0409c2ea21f072820 (patch) | |
tree | 2bebff50071f9f9fef802d2434de951e9c235332 /arch/um/include | |
parent | 5aaf5f7b871abf00fb2525e7ed2d5938a74ce23c (diff) |
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>
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/um_mmu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/include/um_mmu.h b/arch/um/include/um_mmu.h index 82865fcf6872..f575ff91f2a0 100644 --- a/arch/um/include/um_mmu.h +++ b/arch/um/include/um_mmu.h | |||
@@ -13,6 +13,7 @@ | |||
13 | typedef struct mm_context { | 13 | typedef struct mm_context { |
14 | struct mm_id id; | 14 | struct mm_id id; |
15 | struct uml_ldt ldt; | 15 | struct uml_ldt ldt; |
16 | struct page **stub_pages; | ||
16 | } mm_context_t; | 17 | } mm_context_t; |
17 | 18 | ||
18 | extern void __switch_mm(struct mm_id * mm_idp); | 19 | extern void __switch_mm(struct mm_id * mm_idp); |