diff options
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 65709a6aa6ee..8c3f3113a6ec 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -807,8 +807,6 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
807 | /* get the address */ | 807 | /* get the address */ |
808 | address = read_cr2(); | 808 | address = read_cr2(); |
809 | 809 | ||
810 | if (unlikely(notify_page_fault(regs))) | ||
811 | return; | ||
812 | if (unlikely(kmmio_fault(regs, address))) | 810 | if (unlikely(kmmio_fault(regs, address))) |
813 | return; | 811 | return; |
814 | 812 | ||
@@ -838,6 +836,9 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
838 | if (spurious_fault(error_code, address)) | 836 | if (spurious_fault(error_code, address)) |
839 | return; | 837 | return; |
840 | 838 | ||
839 | /* kprobes don't want to hook the spurious faults. */ | ||
840 | if (notify_page_fault(regs)) | ||
841 | return; | ||
841 | /* | 842 | /* |
842 | * Don't take the mm semaphore here. If we fixup a prefetch | 843 | * Don't take the mm semaphore here. If we fixup a prefetch |
843 | * fault we could otherwise deadlock. | 844 | * fault we could otherwise deadlock. |
@@ -846,6 +847,8 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
846 | return; | 847 | return; |
847 | } | 848 | } |
848 | 849 | ||
850 | if (unlikely(notify_page_fault(regs))) | ||
851 | return; | ||
849 | /* | 852 | /* |
850 | * It's safe to allow irq's after cr2 has been saved and the | 853 | * It's safe to allow irq's after cr2 has been saved and the |
851 | * vmalloc fault has been handled. | 854 | * vmalloc fault has been handled. |