Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349728
b: refs/heads/master
c: e575a86
h: refs/heads/master
v: v3
  • Loading branch information
Kees Cook authored and Ingo Molnar committed Feb 7, 2013
1 parent e4e0f26 commit 8e3da82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb9b1a834f7a916a65ba64f4812078cfbe2f4fc4
refs/heads/master: e575a86fdc50d013bf3ad3aa81d9100e8e6cc60d
8 changes: 5 additions & 3 deletions trunk/arch/x86/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,15 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
return;
}
#endif
/* Kernel addresses are always protection faults: */
if (address >= TASK_SIZE)
error_code |= PF_PROT;

if (unlikely(show_unhandled_signals))
if (likely(show_unhandled_signals))
show_signal_msg(regs, error_code, address, tsk);

/* Kernel addresses are always protection faults: */
tsk->thread.cr2 = address;
tsk->thread.error_code = error_code | (address >= TASK_SIZE);
tsk->thread.error_code = error_code;
tsk->thread.trap_nr = X86_TRAP_PF;

force_sig_info_fault(SIGSEGV, si_code, address, tsk, 0);
Expand Down

0 comments on commit 8e3da82

Please sign in to comment.