diff --git a/mm/util.c b/mm/util.c index 70b975249..5ab0673cd 100755 --- a/mm/util.c +++ b/mm/util.c @@ -372,9 +372,9 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) { /* Is the current task 32bit ? */ if (!IS_ENABLED(CONFIG_64BIT) || is_compat_task()) - return randomize_page(mm->brk, SZ_32M); + return mm->brk + get_random_long() % SZ_32M; - return randomize_page(mm->brk, SZ_1G); + return mm->brk + get_random_long() % SZ_1G; } unsigned long arch_mmap_rnd(void)