]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Merge i386 fix for page fault to x86-64
authorAndrew Morton <akpm@osdl.org>
Mon, 29 Dec 2003 13:50:23 +0000 (05:50 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 29 Dec 2003 13:50:23 +0000 (05:50 -0800)
From: Andi Kleen <ak@muc.de>

Merge the i386 fix for the page fault from Linus to x86-64
(I'm not actually sure what it fixes, but if it's good for 32bit
it is likely good for 64bit too)

arch/x86_64/mm/fault.c

index ba3227b343607171fd639d1c93af600ee11fe771..c74156b0001b54c7c0cf282b52beb49bf5c354b4 100644 (file)
@@ -340,7 +340,8 @@ bad_area_nosemaphore:
                }
        
                tsk->thread.cr2 = address;
-               tsk->thread.error_code = error_code;
+               /* Kernel addresses are always protection faults */
+               tsk->thread.error_code = error_code | (address >= TASK_SIZE);
                tsk->thread.trap_no = 14;
                info.si_signo = SIGSEGV;
                info.si_errno = 0;