patch-1.3.43 linux/arch/i386/mm/fault.c

Next file: linux/drivers/block/README.ide
Previous file: linux/arch/i386/kernel/traps.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.42/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
@@ -46,8 +46,6 @@
 		goto good_area;
 	if (!(vma->vm_flags & VM_GROWSDOWN))
 		goto bad_area;
-	if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur)
-		goto bad_area;
 	if (error_code & 4) {
 		/*
 		 * accessing the stack below %esp is always a bug.
@@ -58,8 +56,8 @@
 		if (address + 32 < regs->esp)
 			goto bad_area;
 	}
-	vma->vm_offset -= vma->vm_start - (address & PAGE_MASK);
-	vma->vm_start = (address & PAGE_MASK);
+	if (expand_stack(vma, address))
+		goto bad_area;
 /*
  * Ok, we have a good vm_area for this memory access, so
  * we can handle it..

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this