aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <benh@debian.org>2010-02-24 01:07:52 +0000
committerBen Hutchings <benh@debian.org>2010-02-24 01:07:52 +0000
commit97ce96168997000ebc462e4cf619f54aecd67c64 (patch)
treef79e3052593bbdf640a51be7c83cf383a63b2abb
parentfaa80a5e809118ec4b2314c2502c681bd96b0e7a (diff)
downloadkernel_replicant_linux-97ce96168997000ebc462e4cf619f54aecd67c64.tar.gz
kernel_replicant_linux-97ce96168997000ebc462e4cf619f54aecd67c64.tar.bz2
kernel_replicant_linux-97ce96168997000ebc462e4cf619f54aecd67c64.zip
fs/exec.c: fix initial stack reservation (regression in 2.6.32.9)
svn path=/dists/sid/linux-2.6/; revision=15266
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/bugfix/all/fs-exec.c-fix-initial-stack-reservation.patch47
-rw-r--r--debian/patches/series/91
3 files changed, 49 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 3fc7da9bd5f7..f78fc597ba9e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ linux-2.6 (2.6.32-9) UNRELEASED; urgency=low
(Closes: #508108)
* sfc: Apply fixes from 2.6.33
* ath9k: Add support for AR2427
+ * fs/exec.c: fix initial stack reservation (regression in 2.6.32.9)
[ maximilian attems]
* Postinst don't refercence k-p related manpage. (closes: #542208)
diff --git a/debian/patches/bugfix/all/fs-exec.c-fix-initial-stack-reservation.patch b/debian/patches/bugfix/all/fs-exec.c-fix-initial-stack-reservation.patch
new file mode 100644
index 000000000000..4476840486c2
--- /dev/null
+++ b/debian/patches/bugfix/all/fs-exec.c-fix-initial-stack-reservation.patch
@@ -0,0 +1,47 @@
+From a17e18790a8c47113a73139d54a375dc9ccd8f08 Mon Sep 17 00:00:00 2001
+From: Michael Neuling <mikey@neuling.org>
+Date: Mon, 22 Feb 2010 12:44:24 -0800
+Subject: [PATCH] fs/exec.c: fix initial stack reservation
+
+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>
+Cc: <stable@kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+---
+ fs/exec.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/fs/exec.c b/fs/exec.c
+index e95c692..cce6bbd 100644
+--- a/fs/exec.c
++++ b/fs/exec.c
+@@ -637,7 +637,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;
+--
+1.6.6.2
+
diff --git a/debian/patches/series/9 b/debian/patches/series/9
index 99ed5157bdd8..fd418b9dce3e 100644
--- a/debian/patches/series/9
+++ b/debian/patches/series/9
@@ -22,3 +22,4 @@
+ features/arm/openrd-base-uart.patch
+ features/arm/dns323-rev-a1-powerled.patch
+ bugfix/all/vgaarb-fix-target-default-passing.patch
++ bugfix/all/fs-exec.c-fix-initial-stack-reservation.patch