[PATCH -mm] kprobes: fix prepare_booster to get correct slot

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Masami Hiramatsu
Date: Monday, March 10, 2008 - 5:06 pm

Fix to get correct slot number from probing address
in prepare_booster.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
---
Andrew, this is a bugfix of
kprobes-kprobe-booster-for-ia64.patch

 arch/ia64/kernel/kprobes.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.25-rc3-mm1/arch/ia64/kernel/kprobes.c
===================================================================
--- 2.6.25-rc3-mm1.orig/arch/ia64/kernel/kprobes.c
+++ 2.6.25-rc3-mm1/arch/ia64/kernel/kprobes.c
@@ -565,7 +565,7 @@ static int __kprobes can_boost(bundle_t
 static void __kprobes prepare_booster(struct kprobe *p)
 {
 	unsigned long addr = (unsigned long)p->addr & ~0xFULL;
-	unsigned int slot = addr & 0xf;
+	unsigned int slot = (unsigned long)p->addr & 0xf;
 	struct kprobe *other_kp;

 	if (can_boost(&p->ainsn.insn[0].bundle, slot, addr)) {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mm] kprobes: kprobe-booster for ia64, Masami Hiramatsu, (Fri Mar 7, 9:01 am)
Re: [PATCH -mm] kprobes: kprobe-booster for ia64, Shaohua Li, (Sun Mar 9, 8:43 pm)
Re: [PATCH -mm] kprobes: kprobe-booster for ia64, Masami Hiramatsu, (Mon Mar 10, 11:25 am)
[PATCH -mm] kprobes: fix prepare_booster to get correct slot, Masami Hiramatsu, (Mon Mar 10, 5:06 pm)
Re: [PATCH -mm] kprobes: kprobe-booster for ia64, Shaohua Li, (Mon Mar 10, 6:20 pm)
Re: [PATCH -mm] kprobes: kprobe-booster for ia64, Masami Hiramatsu, (Tue Mar 11, 11:17 am)