x86: fix kprobe_handler reenable preemption
authorMasami Hiramatsu <mhiramat@redhat.com>
Wed, 30 Jan 2008 12:32:01 +0000 (13:32 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:32:01 +0000 (13:32 +0100)
Fix a preemption bug in kprobe_handler(). It has to call preempt_enable()
before returning.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/kprobes.c

index 521a469acaad9b7a62257c30c62cd08cc6beeaf6..f0f2b98b9e20fd6568f09bf065b19776d6788a40 100644 (file)
@@ -467,7 +467,8 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
                                arch_disarm_kprobe(p);
                                regs->ip = (unsigned long)p->addr;
                                reset_current_kprobe();
-                               return 1;
+                               ret = 1;
+                               goto no_kprobe;
 #endif
                        }
                        /* We have reentered the kprobe_handler(), since