[kernel] r16142 - in dists/lenny-security/linux-2.6/debian/patches: bugfix/all series

Dann Frazier dannf at alioth.debian.org
Sat Aug 14 01:47:52 UTC 2010


Author: dannf
Date: Sat Aug 14 01:47:50 2010
New Revision: 16142

Log:
mm: pass correct mm when growing stack

Added:
   dists/lenny-security/linux-2.6/debian/patches/bugfix/all/mm-pass-correct-mm-when-growing-stack.patch
Modified:
   dists/lenny-security/linux-2.6/debian/patches/series/24lenny1

Added: dists/lenny-security/linux-2.6/debian/patches/bugfix/all/mm-pass-correct-mm-when-growing-stack.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny-security/linux-2.6/debian/patches/bugfix/all/mm-pass-correct-mm-when-growing-stack.patch	Sat Aug 14 01:47:50 2010	(r16142)
@@ -0,0 +1,34 @@
+commit 9dac19431cfd8e5677b1e9ca43feba1ea59c40b4
+Author: Hugh Dickins <hugh at veritas.com>
+Date:   Thu Apr 16 21:58:12 2009 +0100
+
+    mm: pass correct mm when growing stack
+    
+    Tetsuo Handa reports seeing the WARN_ON(current->mm == NULL) in
+    security_vm_enough_memory(), when do_execve() is touching the
+    target mm's stack, to set up its args and environment.
+    
+    Yes, a UMH_NO_WAIT or UMH_WAIT_PROC call_usermodehelper() spawns
+    an mm-less kernel thread to do the exec.  And in any case, that
+    vm_enough_memory check when growing stack ought to be done on the
+    target mm, not on the execer's mm (though apart from the warning,
+    it only makes a slight tweak to OVERCOMMIT_NEVER behaviour).
+    
+    Reported-by: Tetsuo Handa <penguin-kernel at i-love.sakura.ne.jp>
+    Signed-off-by: Hugh Dickins <hugh at veritas.com>
+    Cc: stable at kernel.org
+    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+
+diff --git a/mm/mmap.c b/mm/mmap.c
+index be95d3b..497c9ed 100644
+--- a/mm/mmap.c
++++ b/mm/mmap.c
+@@ -1563,7 +1563,7 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un
+ 	 * Overcommit..  This must be the final test, as it will
+ 	 * update security statistics.
+ 	 */
+-	if (security_vm_enough_memory(grow))
++	if (security_vm_enough_memory_mm(mm, grow))
+ 		return -ENOMEM;
+ 
+ 	/* Ok, everything looks good - let it rip */

Modified: dists/lenny-security/linux-2.6/debian/patches/series/24lenny1
==============================================================================
--- dists/lenny-security/linux-2.6/debian/patches/series/24lenny1	Sat Aug 14 01:21:34 2010	(r16141)
+++ dists/lenny-security/linux-2.6/debian/patches/series/24lenny1	Sat Aug 14 01:47:50 2010	(r16142)
@@ -10,3 +10,4 @@
 + bugfix/all/mm-keep-a-guard-page-below-a-grow-down-stack-segment.patch
 + bugfix/all/mm-fix-missing-page-table-unmap-for-stack-guard-page-failure-case.patch
 + bugfix/x86/dont-send-SIGBUS-for-kernel-page-faults.patch
++ bugfix/all/mm-pass-correct-mm-when-growing-stack.patch



More information about the Kernel-svn-changes mailing list