aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-17 09:34:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-17 09:34:10 -0700
commit415bfd9cdb175cf870fb173ae9d3958862de2c97 (patch)
tree1a240acba43e2abbc7fc45ca038f57908fbb71e1 /arch/sh/kernel
parentMerge branch 'akpm' (patches from Andrew) (diff)
parentarch/sh: Check for kprobe trap number before trying to handle a kprobe trap (diff)
downloadlinux-dev-415bfd9cdb175cf870fb173ae9d3958862de2c97.tar.xz
linux-dev-415bfd9cdb175cf870fb173ae9d3958862de2c97.zip
Merge tag 'for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux
Pull SH updates from Yoshinori Sato. kprobe fix, defconfig updates and a SH Kconfig fix. * tag 'for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux: arch/sh: Check for kprobe trap number before trying to handle a kprobe trap sh: configs: Remove useless UEVENT_HELPER_PATH Fix allyesconfig output.
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r--arch/sh/kernel/kprobes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
index 1f8c0d30567f..318296f48f1a 100644
--- a/arch/sh/kernel/kprobes.c
+++ b/arch/sh/kernel/kprobes.c
@@ -485,7 +485,8 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
addr = (kprobe_opcode_t *) (args->regs->pc);
- if (val == DIE_TRAP) {
+ if (val == DIE_TRAP &&
+ args->trapnr == (BREAKPOINT_INSTRUCTION & 0xff)) {
if (!kprobe_running()) {
if (kprobe_handler(args->regs)) {
ret = NOTIFY_STOP;