From ac2a659968f5318a180213f0409c2ea21f072820 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Fri, 8 Feb 2008 04:22:11 -0800 Subject: 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 Cc: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/include/um_mmu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/um/include') diff --git a/arch/um/include/um_mmu.h b/arch/um/include/um_mmu.h index 82865fcf687..f575ff91f2a 100644 --- a/arch/um/include/um_mmu.h +++ b/arch/um/include/um_mmu.h @@ -13,6 +13,7 @@ typedef struct mm_context { struct mm_id id; struct uml_ldt ldt; + struct page **stub_pages; } mm_context_t; extern void __switch_mm(struct mm_id * mm_idp); -- cgit v1.2.3-70-g09d2