]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mm/fault.c
Merge branch 'linus' into x86/apic
[linux-2.6-omap-h63xx.git] / arch / x86 / mm / fault.c
index d3eee74f830ad71bbc2fdad868e9f3549a581d96..2a9ea3aee4935b801f1405550592988eefc59236 100644 (file)
@@ -806,8 +806,6 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
        /* get the address */
        address = read_cr2();
 
-       if (unlikely(notify_page_fault(regs)))
-               return;
        if (unlikely(kmmio_fault(regs, address)))
                return;
 
@@ -837,6 +835,9 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
                if (spurious_fault(error_code, address))
                        return;
 
+               /* kprobes don't want to hook the spurious faults. */
+               if (notify_page_fault(regs))
+                       return;
                /*
                 * Don't take the mm semaphore here. If we fixup a prefetch
                 * fault we could otherwise deadlock.
@@ -845,6 +846,8 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
                return;
        }
 
+       if (unlikely(notify_page_fault(regs)))
+               return;
        /*
         * It's safe to allow irq's after cr2 has been saved and the
         * vmalloc fault has been handled.