Commit 4d840923 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] Don't inherit mm->def_flags across forks

Prevents children from inheriting mlockall(MCL_FUTURE).
Standards-friendly, and 2.4 has it.
parent 577c516f
...@@ -334,8 +334,10 @@ static struct mm_struct * mm_init(struct mm_struct * mm) ...@@ -334,8 +334,10 @@ static struct mm_struct * mm_init(struct mm_struct * mm)
mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm); mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm);
mm->free_area_cache = TASK_UNMAPPED_BASE; mm->free_area_cache = TASK_UNMAPPED_BASE;
if (likely(!mm_alloc_pgd(mm))) if (likely(!mm_alloc_pgd(mm))) {
mm->def_flags = 0;
return mm; return mm;
}
free_mm(mm); free_mm(mm);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment