aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/process_kern.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c
index f6a5a502120b..537895d68ad1 100644
--- a/arch/um/kernel/process_kern.c
+++ b/arch/um/kernel/process_kern.c
@@ -23,6 +23,7 @@
23#include "linux/proc_fs.h" 23#include "linux/proc_fs.h"
24#include "linux/ptrace.h" 24#include "linux/ptrace.h"
25#include "linux/random.h" 25#include "linux/random.h"
26#include "linux/personality.h"
26#include "asm/unistd.h" 27#include "asm/unistd.h"
27#include "asm/mman.h" 28#include "asm/mman.h"
28#include "asm/segment.h" 29#include "asm/segment.h"
@@ -476,7 +477,7 @@ int singlestepping(void * t)
476#ifndef arch_align_stack 477#ifndef arch_align_stack
477unsigned long arch_align_stack(unsigned long sp) 478unsigned long arch_align_stack(unsigned long sp)
478{ 479{
479 if (randomize_va_space) 480 if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
480 sp -= get_random_int() % 8192; 481 sp -= get_random_int() % 8192;
481 return sp & ~0xf; 482 return sp & ~0xf;
482} 483}