From: Heiko Carstens Date: Mon, 5 Feb 2007 20:17:29 +0000 (+0100) Subject: [S390] Fix kprobes breakpoint handling. X-Git-Tag: v2.6.21-rc1~92^2~41^2~18 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35df8d53f5c951ac0cd79f1084e6787ca5980207;p=linux-2.6 [S390] Fix kprobes breakpoint handling. In case of an illegal op the die notifier gets called with DIE_TRAP instead of DIE_BPT first. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index aa0d7ee71c..f0e5a320e2 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -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)