Skip to content

Commit

Permalink
[IA64] kprobes: fixup the pagefault exception caused by probehandlers
Browse files Browse the repository at this point in the history
If the user-specified kprobe handler causes the page fault when accessing
user space address, fixup this fault since do_page_fault() should not
continue as the kprobe handler are run with preemption disabled.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Keshavamurthy Anil S authored and Tony Luck committed Sep 26, 2006
1 parent 214ddde commit fd32cb3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/ia64/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,12 @@ static int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr)
*/
if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr))
return 1;
/*
* In case the user-specified fault handler returned
* zero, try to fix up.
*/
if (ia64_done_with_exception(regs))
return 1;

/*
* Let ia64_do_page_fault() fix it.
Expand Down

0 comments on commit fd32cb3

Please sign in to comment.