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>
This commit is contained in:
committed by
Linus Torvalds
parent
5aaf5f7b87
commit
ac2a659968
@@ -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);
|
||||
|
Reference in New Issue
Block a user