lkml.org 
[lkml]   [2003]   [Oct]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 16 Oct 2003 03:22:35 -0400 (EDT)
FromZwane Mwaikambo <>
Subject[PATCH][2.6] Fix 4G/4G and WP test lockup
Hi Ingo,
	It looks like when we do the WP test and trigger a 
(write) protection fault, the 4G/4G page fault handling path doesn't 
expect this kind of fault and instead results in recursive fault handling 
(or so it appears).

How does the following look?

Index: linux-2.6.0-test7-mm1/arch/i386/mm/fault.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test7-mm1/arch/i386/mm/fault.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 fault.c
--- linux-2.6.0-test7-mm1/arch/i386/mm/fault.c	15 Oct 2003 09:01:14 -0000	1.1.1.1
+++ linux-2.6.0-test7-mm1/arch/i386/mm/fault.c	16 Oct 2003 06:42:42 -0000
@@ -260,8 +260,12 @@ asmlinkage void do_page_fault(struct pt_
 	/*
 	 * On 4/4 all kernels faults are either bugs, vmalloc or prefetch
 	 */
-	if (unlikely((regs->xcs & 3) == 0))
+	if (unlikely((regs->xcs & 3) == 0)) {
+		if (error_code & 3)
+			goto bad_area_nosemaphore;
+
  		goto vmalloc_fault;
+	}
 #else
 	if (unlikely(address >= TASK_SIZE)) { 
 		if (!(error_code & 5))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2008