[PATCH] kprobes: fix bug when probed on task and isr functions
[linux-2.6.git] / arch / x86_64 / kernel / kprobes.c
index 2d7658f..df08c43 100644 (file)
@@ -311,7 +311,8 @@ int __kprobes kprobe_handler(struct pt_regs *regs)
                   Disarm the probe we just hit, and ignore it. */
                p = get_kprobe(addr);
                if (p) {
-                       if (kprobe_status == KPROBE_HIT_SS) {
+                       if (kprobe_status == KPROBE_HIT_SS &&
+                               *p->ainsn.insn == BREAKPOINT_INSTRUCTION) {
                                regs->eflags &= ~TF_MASK;
                                regs->eflags |= kprobe_saved_rflags;
                                unlock_kprobes();