OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
arch/sh: Check for kprobe trap number before trying to handle a kprobe trap
[uclinux-h8/linux.git]
/
arch
/
sh
/
kernel
/
kprobes.c
diff --git
a/arch/sh/kernel/kprobes.c
b/arch/sh/kernel/kprobes.c
index
1f8c0d3
..
318296f
100644
(file)
--- 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);
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;
if (!kprobe_running()) {
if (kprobe_handler(args->regs)) {
ret = NOTIFY_STOP;