patch-2.4.26 linux-2.4.26/arch/x86_64/mm/fault.c

Next file: linux-2.4.26/arch/x86_64/mm/k8topology.c
Previous file: linux-2.4.26/arch/x86_64/lib/usercopy.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/arch/x86_64/mm/fault.c linux-2.4.26/arch/x86_64/mm/fault.c
@@ -327,7 +327,8 @@
 					regs->rsp, error_code);
 	
 		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;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)