aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/fault.c')
-rw-r--r--arch/sh/mm/fault.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 3093bc372138..5f51456f4fc7 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -24,20 +24,6 @@
24#include <asm/tlbflush.h> 24#include <asm/tlbflush.h>
25#include <asm/traps.h> 25#include <asm/traps.h>
26 26
27static inline int notify_page_fault(struct pt_regs *regs, int trap)
28{
29 int ret = 0;
30
31 if (kprobes_built_in() && !user_mode(regs)) {
32 preempt_disable();
33 if (kprobe_running() && kprobe_fault_handler(regs, trap))
34 ret = 1;
35 preempt_enable();
36 }
37
38 return ret;
39}
40
41static void 27static void
42force_sig_info_fault(int si_signo, int si_code, unsigned long address) 28force_sig_info_fault(int si_signo, int si_code, unsigned long address)
43{ 29{
@@ -412,14 +398,14 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
412 if (unlikely(fault_in_kernel_space(address))) { 398 if (unlikely(fault_in_kernel_space(address))) {
413 if (vmalloc_fault(address) >= 0) 399 if (vmalloc_fault(address) >= 0)
414 return; 400 return;
415 if (notify_page_fault(regs, vec)) 401 if (kprobe_page_fault(regs, vec))
416 return; 402 return;
417 403
418 bad_area_nosemaphore(regs, error_code, address); 404 bad_area_nosemaphore(regs, error_code, address);
419 return; 405 return;
420 } 406 }
421 407
422 if (unlikely(notify_page_fault(regs, vec))) 408 if (unlikely(kprobe_page_fault(regs, vec)))
423 return; 409 return;
424 410
425 /* Only enable interrupts if they were on before the fault */ 411 /* Only enable interrupts if they were on before the fault */