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