diff options
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index fe99af4b86d9..379beaec6caa 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -68,11 +68,10 @@ static inline int kmmio_fault(struct pt_regs *regs, unsigned long addr) | |||
68 | 68 | ||
69 | static inline int notify_page_fault(struct pt_regs *regs) | 69 | static inline int notify_page_fault(struct pt_regs *regs) |
70 | { | 70 | { |
71 | #ifdef CONFIG_KPROBES | ||
72 | int ret = 0; | 71 | int ret = 0; |
73 | 72 | ||
74 | /* kprobe_running() needs smp_processor_id() */ | 73 | /* kprobe_running() needs smp_processor_id() */ |
75 | if (!user_mode_vm(regs)) { | 74 | if (kprobes_built_in() && !user_mode_vm(regs)) { |
76 | preempt_disable(); | 75 | preempt_disable(); |
77 | if (kprobe_running() && kprobe_fault_handler(regs, 14)) | 76 | if (kprobe_running() && kprobe_fault_handler(regs, 14)) |
78 | ret = 1; | 77 | ret = 1; |
@@ -80,9 +79,6 @@ static inline int notify_page_fault(struct pt_regs *regs) | |||
80 | } | 79 | } |
81 | 80 | ||
82 | return ret; | 81 | return ret; |
83 | #else | ||
84 | return 0; | ||
85 | #endif | ||
86 | } | 82 | } |
87 | 83 | ||
88 | /* | 84 | /* |