diff options
author | Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com> | 2006-09-25 19:32:20 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-09-26 14:33:32 -0400 |
commit | fd32cb3a9c9f9399421408e8734cd8a6d9d1a09f (patch) | |
tree | d030d93f169bd9ff39019dacc8f5b3c5a828b079 /arch/ia64/kernel/kprobes.c | |
parent | 214ddde2f95037e129eff7e895869771719c7c1b (diff) |
[IA64] kprobes: fixup the pagefault exception caused by probehandlers
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>
Diffstat (limited to 'arch/ia64/kernel/kprobes.c')
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 320cb7a91c9d..169ec3a7156c 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -771,6 +771,12 @@ static int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr) | |||
771 | */ | 771 | */ |
772 | if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr)) | 772 | if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr)) |
773 | return 1; | 773 | return 1; |
774 | /* | ||
775 | * In case the user-specified fault handler returned | ||
776 | * zero, try to fix up. | ||
777 | */ | ||
778 | if (ia64_done_with_exception(regs)) | ||
779 | return 1; | ||
774 | 780 | ||
775 | /* | 781 | /* |
776 | * Let ia64_do_page_fault() fix it. | 782 | * Let ia64_do_page_fault() fix it. |