|
@@ -941,9 +941,13 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
|
|
current->mm->start_stack = bprm->p;
|
|
|
|
|
|
#ifdef arch_randomize_brk
|
|
|
- if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1))
|
|
|
+ if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) {
|
|
|
current->mm->brk = current->mm->start_brk =
|
|
|
arch_randomize_brk(current->mm);
|
|
|
+#ifdef CONFIG_COMPAT_BRK
|
|
|
+ current->brk_randomized = 1;
|
|
|
+#endif
|
|
|
+ }
|
|
|
#endif
|
|
|
|
|
|
if (current->personality & MMAP_PAGE_ZERO) {
|