aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/fault.c')
-rw-r--r--arch/arm/mm/fault.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 0e417233dad7..890eeaac3cbb 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -27,28 +27,6 @@
27 27
28#ifdef CONFIG_MMU 28#ifdef CONFIG_MMU
29 29
30#ifdef CONFIG_KPROBES
31static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr)
32{
33 int ret = 0;
34
35 if (!user_mode(regs)) {
36 /* kprobe_running() needs smp_processor_id() */
37 preempt_disable();
38 if (kprobe_running() && kprobe_fault_handler(regs, fsr))
39 ret = 1;
40 preempt_enable();
41 }
42
43 return ret;
44}
45#else
46static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr)
47{
48 return 0;
49}
50#endif
51
52/* 30/*
53 * This is useful to dump out the page tables associated with 31 * This is useful to dump out the page tables associated with
54 * 'addr' in mm 'mm'. 32 * 'addr' in mm 'mm'.
@@ -265,7 +243,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
265 vm_fault_t fault; 243 vm_fault_t fault;
266 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; 244 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
267 245
268 if (notify_page_fault(regs, fsr)) 246 if (kprobe_page_fault(regs, fsr))
269 return 0; 247 return 0;
270 248
271 tsk = current; 249 tsk = current;