Re: [PATCH][2.6] Fix 4G/4G and WP test lockup

From: Ingo Molnar
Date: Thu Oct 16 2003 - 02:29:56 EST



fine with me.

Ingo

On Thu, 16 Oct 2003, Zwane Mwaikambo wrote:

> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/