diff options
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r-- | fs/binfmt_elf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 672a3b90bc55..5109dbff93bf 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -515,7 +515,8 @@ static unsigned long randomize_stack_top(unsigned long stack_top) | |||
515 | { | 515 | { |
516 | unsigned int random_variable = 0; | 516 | unsigned int random_variable = 0; |
517 | 517 | ||
518 | if (current->flags & PF_RANDOMIZE) { | 518 | if ((current->flags & PF_RANDOMIZE) && |
519 | !(current->personality & ADDR_NO_RANDOMIZE)) { | ||
519 | random_variable = get_random_int() & STACK_RND_MASK; | 520 | random_variable = get_random_int() & STACK_RND_MASK; |
520 | random_variable <<= PAGE_SHIFT; | 521 | random_variable <<= PAGE_SHIFT; |
521 | } | 522 | } |