From: Satoshi Oshima I found a bug of kprobes in i386. Kprobe-booster doesn't work if CONFIG_PREEMPT is not set. Because pre_preempt_count is always 0. Boostability have been disabled when removing '#ifdef CONFIG_PREEMPT' I think. This bug doesn't cause a kernel panic. Signed-off-by: Satoshi Oshima Cc: bibo, mao Cc: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: "Keshavamurthy, Anil S" Cc: Prasanna S Panchamukhi Cc: Jim Keniston Cc: Yumiko Sugita Cc: Satoshi Oshima Cc: Hideo Aoki Signed-off-by: Andrew Morton --- arch/i386/kernel/kprobes.c | 4 ++++ 1 files changed, 4 insertions(+) diff -puN arch/i386/kernel/kprobes.c~kprobemulti-kprobe-posthandler-for-booster-kprobes-bugfix-of-kprobe-booster-reenable-kprobe-booster arch/i386/kernel/kprobes.c --- 25/arch/i386/kernel/kprobes.c~kprobemulti-kprobe-posthandler-for-booster-kprobes-bugfix-of-kprobe-booster-reenable-kprobe-booster Fri May 19 13:24:26 2006 +++ 25-akpm/arch/i386/kernel/kprobes.c Fri May 19 13:24:26 2006 @@ -257,7 +257,11 @@ static int __kprobes kprobe_handler(stru int ret = 0; kprobe_opcode_t *addr; struct kprobe_ctlblk *kcb; +#ifdef CONFIG_PREEMPT unsigned pre_preempt_count = preempt_count(); +#else + unsigned pre_preempt_count = 1; +#endif addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t)); _