summaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-12-16 23:10:40 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-16 23:10:40 +0300
commit5ee863bec794f30bdf7fdf57ce0d9f579b0d1aa3 (patch)
tree3df979768ee186024fe8320b6a2f354f1e4ad41b /fs/exec.c
parent8312f41f08edc641aa927d31fb71319694ae9c42 (diff)
parent39b1e779b6e2d4ca7967b49b26f1e4358f20c90c (diff)
downloadlinux-5ee863bec794f30bdf7fdf57ce0d9f579b0d1aa3.tar.xz
Merge branch 'parisc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "A change to increase the default maximum stack size on parisc to 100MB and the ability to further increase the stack hard limit size at runtime with ulimit for newly started processes. The other patches fix compile warnings, utilize the Kbuild logic and cleanups the parisc arch code" * 'parisc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: pci-dma: fix warning unused-function parisc/uapi: Use Kbuild logic to provide <asm/types.h> parisc: Make user stack size configurable parisc: Use _TIF_USER_WORK_MASK in entry.S parisc: Drop loops_per_jiffy from per_cpu struct
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c
index c238c258afce..5d4d52039105 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -757,8 +757,8 @@ int setup_arg_pages(struct linux_binprm *bprm,
#ifdef CONFIG_STACK_GROWSUP
/* Limit stack size */
stack_base = bprm->rlim_stack.rlim_max;
- if (stack_base > STACK_SIZE_MAX)
- stack_base = STACK_SIZE_MAX;
+
+ stack_base = calc_max_stack_size(stack_base);
/* Add space for stack randomization. */
stack_base += (STACK_RND_MASK << PAGE_SHIFT);