diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-18 15:33:09 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-18 15:33:09 -0700 |
| commit | 909eacd748b3c8d15e6a239aa67f7828885d798e (patch) | |
| tree | 87f88e6c53800a3f9b8cc0867845cf116c7416fe /fs/exec.c | |
| parent | aa519be34f45954f33a6c20430deac8e544a180f (diff) | |
| parent | e26081808edadfd257c6c9d81014e3b25e9a6118 (diff) | |
Merge 4.1-rc4 into usb-next
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c index 49a1c61433b7..1977c2a553ac 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -659,6 +659,9 @@ int setup_arg_pages(struct linux_binprm *bprm, if (stack_base > STACK_SIZE_MAX) stack_base = STACK_SIZE_MAX; + /* Add space for stack randomization. */ + stack_base += (STACK_RND_MASK << PAGE_SHIFT); + /* Make sure we didn't let the argument array grow too large. */ if (vma->vm_end - vma->vm_start > stack_base) return -ENOMEM; |
