[lkml]   [2010]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[009/145] fs/exec.c: fix initial stack reservation
2.6.32-stable review patch.  If anyone has any objections, please let me know.

From: Michael Neuling <>

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

Signed-off-by: Michael Neuling <>
Reviewed-by: KOSAKI Motohiro <>
Acked-by: WANG Cong <>
Cc: Anton Blanchard <>
Cc: Oleg Nesterov <>
Cc: James Morris <>
Cc: Serge Hallyn <>
Cc: Benjamin Herrenschmidt <>
Cc: Jouni Malinen <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Greg Kroah-Hartman <>

fs/exec.c | 1 -
1 file changed, 1 deletion(-)

--- a/fs/exec.c
+++ b/fs/exec.c
@@ -638,7 +638,6 @@ int setup_arg_pages(struct linux_binprm
* will align it up.
rlim_stack = rlimit(RLIMIT_STACK) & PAGE_MASK;
- rlim_stack = min(rlim_stack, stack_size);
if (stack_size + stack_expand > rlim_stack)
stack_base = vma->vm_start + rlim_stack;

 \ /
  Last update: 2010-03-13 02:17    [W:0.309 / U:7.268 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site