Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Keshavamurthy Anil S and committed by
Tony Luck
fd32cb3a 214ddde2

+6
+6
arch/ia64/kernel/kprobes.c
··· 771 771 */ 772 772 if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr)) 773 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 782 * Let ia64_do_page_fault() fix it.