diff options
author | Michael Neuling <mikey@neuling.org> | 2010-02-22 12:44:24 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-15 08:49:33 -0700 |
commit | 30ef8852b60f811d9ceca04590a2bd4373e7e81e (patch) | |
tree | 398714464842065754cb685c1274cbc38104dc90 /fs/exec.c | |
parent | 601c25d9fd1d5c4629e5361271cfe9cd0ffb4c98 (diff) | |
download | lwn-30ef8852b60f811d9ceca04590a2bd4373e7e81e.tar.gz lwn-30ef8852b60f811d9ceca04590a2bd4373e7e81e.zip |
fs/exec.c: fix initial stack reservation
commit a17e18790a8c47113a73139d54a375dc9ccd8f08 upstream.
803bf5ec259941936262d10ecc84511b76a20921 ("fs/exec.c: restrict initial
stack space expansion to rlimit") attempts to limit the initial stack to
20*PAGE_SIZE. Unfortunately, in attempting ensure the stack is not
reduced in size, we ended up not changing the stack at all.
This size reduction check is not necessary as the expand_stack call does
this already.
This caused a regression in UML resulting in most guest processes being
killed.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jouni Malinen <j@w1.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c index da36c206f0f1..9b883664da86 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -638,7 +638,6 @@ int setup_arg_pages(struct linux_binprm *bprm, * will align it up. */ rlim_stack = rlimit(RLIMIT_STACK) & PAGE_MASK; - rlim_stack = min(rlim_stack, stack_size); #ifdef CONFIG_STACK_GROWSUP if (stack_size + stack_expand > rlim_stack) stack_base = vma->vm_start + rlim_stack; |