Message ID | 20211011143150.318239-2-sxwjean@me.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Use generic code for randomization of virtual address of x86 | expand |
diff --git a/mm/util.c b/mm/util.c index e58151a61255..40b1a8837c0b 100644 --- a/mm/util.c +++ b/mm/util.c @@ -414,7 +414,8 @@ void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack) random_factor = arch_mmap_rnd(); if (mmap_is_legacy(rlim_stack)) { - mm->mmap_base = TASK_UNMAPPED_BASE + random_factor; + mm->mmap_legacy_base = TASK_UNMAPPED_BASE + random_factor; + mm->mmap_base = mm->mmap_legacy_base; mm->get_unmapped_area = arch_get_unmapped_area; } else { mm->mmap_base = mmap_base(random_factor, rlim_stack);