All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing/kprobes: fix probe parsing
@ 2010-02-10 16:23 Heiko Carstens
  2010-02-10 22:26 ` Masami Hiramatsu
  2010-02-14  9:13 ` [tip:tracing/urgent] tracing/kprobes: Fix " tip-bot for Heiko Carstens
  0 siblings, 2 replies; 3+ messages in thread
From: Heiko Carstens @ 2010-02-10 16:23 UTC (permalink / raw)
  To: Frederic Weisbecker, Ingo Molnar, Masami Hiramatsu; +Cc: linux-kernel

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Trying to add a probe like

echo p:myprobe 0x10000 > /sys/kernel/debug/tracing/kprobe_events

will fail since the wrong pointer is passed to strict_strtoul
when trying to convert the address to an unsigned long.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 kernel/trace/trace_kprobe.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -689,7 +689,7 @@ static int create_trace_probe(int argc, 
 			return -EINVAL;
 		}
 		/* an address specified */
-		ret = strict_strtoul(&argv[0][2], 0, (unsigned long *)&addr);
+		ret = strict_strtoul(&argv[1][0], 0, (unsigned long *)&addr);
 		if (ret) {
 			pr_info("Failed to parse address.\n");
 			return ret;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-14  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10 16:23 [PATCH] tracing/kprobes: fix probe parsing Heiko Carstens
2010-02-10 22:26 ` Masami Hiramatsu
2010-02-14  9:13 ` [tip:tracing/urgent] tracing/kprobes: Fix " tip-bot for Heiko Carstens

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.