Skip to contentSkip to conversation

x86: fix kprobe_handler reenable preemption

PATCH In review Masami Hiramatsu 3 participants 4 messages Dec 19, 2007 – Dec 20, 2007 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 x86: fix kprobe_handler reenable preemption

Fix a preemption bug in kprobe_handler(). It has to call preempt_enable() before returning.

---
 arch/x86/kernel/kprobes.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/kprobes.c +2 -1
Index: b/arch/x86/kernel/kprobes.c
===================================================================
@@ -467,7 +467,8 @@ static int __kprobes kprobe_handler(stru
 				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
Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: [email protected], [email protected]
#1 lore raw
Quoted 2 lines · Masami Hiramatsu

Fix a preemption bug in kprobe_handler(). It has to call preempt_enable() before returning.

thanks - i've applied all 3 kprobes patches from you. (for v2.6.25)

Ingo

#2 lore raw

v2.6.25 or v2.6.24 ?

Quoted 16 lines · Ingo Molnar
Quoted 2 lines · Masami Hiramatsu

Fix a preemption bug in kprobe_handler(). It has to call preempt_enable() before returning.

thanks - i've applied all 3 kprobes patches from you. (for v2.6.25)

Ingo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
Quoted 1 line · Jaswinder Singh

v2.6.25 or v2.6.24 ?

see: http://www.zip.com.au/~akpm/linux/patches/stuff/top-posting.txt

Quoted 8 lines · Ingo Molnar
Quoted 7 lines · Masami Hiramatsu
Quoted 3 lines

Fix a preemption bug in kprobe_handler(). It has to call preempt_enable() before returning.

thanks - i've applied all 3 kprobes patches from you. (for v2.6.25)

                                                          /^^^^^^^^^^^^

also see: ---------------------------------------------/

(this bug is not present in .24)

Ingo