diff options
Diffstat (limited to 'arch/s390/mm/mmap.c')
-rw-r--r-- | arch/s390/mm/mmap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index ab7e08a01b6c..74d663f367e2 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c | |||
@@ -47,6 +47,15 @@ static unsigned long stack_maxrandom_size(void) | |||
47 | #define MIN_GAP (32*1024*1024) | 47 | #define MIN_GAP (32*1024*1024) |
48 | #define MAX_GAP (STACK_TOP/6*5) | 48 | #define MAX_GAP (STACK_TOP/6*5) |
49 | 49 | ||
50 | static inline int mmap_is_legacy(void) | ||
51 | { | ||
52 | if (current->personality & ADDR_COMPAT_LAYOUT) | ||
53 | return 1; | ||
54 | if (rlimit(RLIMIT_STACK) == RLIM_INFINITY) | ||
55 | return 1; | ||
56 | return sysctl_legacy_va_layout; | ||
57 | } | ||
58 | |||
50 | static inline unsigned long mmap_base(void) | 59 | static inline unsigned long mmap_base(void) |
51 | { | 60 | { |
52 | unsigned long gap = rlimit(RLIMIT_STACK); | 61 | unsigned long gap = rlimit(RLIMIT_STACK); |
@@ -59,15 +68,6 @@ static inline unsigned long mmap_base(void) | |||
59 | return STACK_TOP - stack_maxrandom_size() - (gap & PAGE_MASK); | 68 | return STACK_TOP - stack_maxrandom_size() - (gap & PAGE_MASK); |
60 | } | 69 | } |
61 | 70 | ||
62 | static inline int mmap_is_legacy(void) | ||
63 | { | ||
64 | if (current->personality & ADDR_COMPAT_LAYOUT) | ||
65 | return 1; | ||
66 | if (rlimit(RLIMIT_STACK) == RLIM_INFINITY) | ||
67 | return 1; | ||
68 | return sysctl_legacy_va_layout; | ||
69 | } | ||
70 | |||
71 | #ifndef CONFIG_64BIT | 71 | #ifndef CONFIG_64BIT |
72 | 72 | ||
73 | /* | 73 | /* |