mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zwane Mwaikambo <zwane@arm.linux.org.uk>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>,
	William Lee Irwin III <wli@holomorphy.com>
Subject: [PATCH][2.6] Fix 4G/4G and WP test lockup
Date: Thu, 16 Oct 2003 03:22:35 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0310160244150.2328@montezuma.fsmlabs.com> (raw)

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))

             reply	other threads:[~2003-10-16  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-16  7:22 Zwane Mwaikambo [this message]
2003-10-16  7:23 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0310160244150.2328@montezuma.fsmlabs.com \
    --to=zwane@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®