Skip to content

Commit

Permalink
x86: fix kprobe_handler reenable preemption
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masami Hiramatsu authored and Ingo Molnar committed Jan 30, 2008
1 parent bde6f5f commit ddc66df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ddc66df

Please sign in to comment.