Commit bb872258 authored by Linus Torvalds's avatar Linus Torvalds

Fix x86 kernel page fault error codes

parent 5b85e9e4
...@@ -359,7 +359,8 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code) ...@@ -359,7 +359,8 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
return; return;
tsk->thread.cr2 = address; 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; tsk->thread.trap_no = 14;
info.si_signo = SIGSEGV; info.si_signo = SIGSEGV;
info.si_errno = 0; info.si_errno = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment