diff options
Diffstat (limited to 'arch/x86_64/kernel/kprobes.c')
-rw-r--r-- | arch/x86_64/kernel/kprobes.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index b7dc1f816d13..8b866a8572cf 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c | |||
@@ -334,6 +334,15 @@ int __kprobes kprobe_handler(struct pt_regs *regs) | |||
334 | return 1; | 334 | return 1; |
335 | } | 335 | } |
336 | } else { | 336 | } else { |
337 | if (*addr != BREAKPOINT_INSTRUCTION) { | ||
338 | /* The breakpoint instruction was removed by | ||
339 | * another cpu right after we hit, no further | ||
340 | * handling of this interrupt is appropriate | ||
341 | */ | ||
342 | regs->rip = (unsigned long)addr; | ||
343 | ret = 1; | ||
344 | goto no_kprobe; | ||
345 | } | ||
337 | p = __get_cpu_var(current_kprobe); | 346 | p = __get_cpu_var(current_kprobe); |
338 | if (p->break_handler && p->break_handler(p, regs)) { | 347 | if (p->break_handler && p->break_handler(p, regs)) { |
339 | goto ss_probe; | 348 | goto ss_probe; |