]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - arch/ia64/mm/fault.c
[PATCH] Kprobes/IA64: kdebug die notification mechanism
[linux-2.6.git] / arch / ia64 / mm / fault.c
index 4174ec999dde69366ae7c088c9779486359b2976..ff62551eb3a125765463768adaec354107200b47 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
+#include <asm/kdebug.h>
 
 extern void die (char *, struct pt_regs *, long);
 
@@ -102,6 +103,13 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
                goto bad_area_no_up;
 #endif
 
+       /*
+        * This is to handle the kprobes on user space access instructions
+        */
+       if (notify_die(DIE_PAGE_FAULT, "page fault", regs, code, TRAP_BRKPT,
+                                       SIGSEGV) == NOTIFY_STOP)
+               return;
+
        down_read(&mm->mmap_sem);
 
        vma = find_vma_prev(mm, address, &prev_vma);