]> err.no Git - linux-2.6/commitdiff
[S390] Fix kprobes breakpoint handling.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 5 Feb 2007 20:17:29 +0000 (21:17 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 5 Feb 2007 20:17:29 +0000 (21:17 +0100)
In case of an illegal op the die notifier gets called with DIE_TRAP
instead of DIE_BPT first.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/traps.c

index aa0d7ee71c78207f008eb71ab873b29a30aabcb6..f0e5a320e2ec4d5e43a94802643bcc722017002e 100644 (file)
@@ -490,8 +490,15 @@ static void illegal_op(struct pt_regs * regs, long interruption_code)
 #endif
                } else
                        signal = SIGILL;
-       } else
-               signal = SIGILL;
+       } else {
+               /*
+                * If we get an illegal op in kernel mode, send it through the
+                * kprobes notifier. If kprobes doesn't pick it up, SIGILL
+                */
+               if (notify_die(DIE_BPT, "bpt", regs, interruption_code,
+                              3, SIGTRAP) != NOTIFY_STOP)
+                       signal = SIGILL;
+       }
 
 #ifdef CONFIG_MATHEMU
         if (signal == SIGFPE)