* [GIT PULL] tracing/kprobes: Fix field creation's bad error handling
@ 2009-12-08 9:16 Frederic Weisbecker
2009-12-08 11:57 ` Masami Hiramatsu
2009-12-09 9:57 ` [tip:perf/urgent] " tip-bot for Frederic Weisbecker
0 siblings, 2 replies; 4+ messages in thread
From: Frederic Weisbecker @ 2009-12-08 9:16 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Lai Jiangshan, Steven Rostedt,
Masami Hiramatsu, Li Zefan
Ingo,
Please pull the tracing/fixes branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
tracing/fixes
Thanks,
Frederic
---
Frederic Weisbecker (1):
tracing/kprobes: Fix field creation's bad error handling
kernel/trace/trace_kprobe.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
>From 12e22dfaaee46f70762beb1982a7b86a68317b11 Mon Sep 17 00:00:00 2001
From: Frederic Weisbecker <fweisbec@gmail.com>
Date: Tue, 8 Dec 2009 10:00:04 +0100
Subject: [PATCH] tracing/kprobes: Fix field creation's bad error handling
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@redhat.com>, Li Zefan <lizf@cn.fujitsu.com>
When we define the common event fields in kprobe, we invert the error
handling and return immediately in case of success. Then we omit
to define specific kprobes fields (ip and nargs), and specific
kretprobes fields (func, ret_ip, nargs). And we only define them
when we fail to create common fields.
The most visible consequence is that we can't create filter for
k(ret)probes specific fields.
This patch re-invert the success/error handling to fix it.
Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
---
kernel/trace/trace_kprobe.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index aff5f80..ca04523 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1114,7 +1114,7 @@ static int kprobe_event_define_fields(struct ftrace_event_call *event_call)
struct trace_probe *tp = (struct trace_probe *)event_call->data;
ret = trace_define_common_fields(event_call);
- if (!ret)
+ if (ret)
return ret;
DEFINE_FIELD(unsigned long, ip, FIELD_STRING_IP, 0);
@@ -1132,7 +1132,7 @@ static int kretprobe_event_define_fields(struct ftrace_event_call *event_call)
struct trace_probe *tp = (struct trace_probe *)event_call->data;
ret = trace_define_common_fields(event_call);
- if (!ret)
+ if (ret)
return ret;
DEFINE_FIELD(unsigned long, func, FIELD_STRING_FUNC, 0);
--
1.6.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [GIT PULL] tracing/kprobes: Fix field creation's bad error handling
2009-12-08 9:16 [GIT PULL] tracing/kprobes: Fix field creation's bad error handling Frederic Weisbecker
@ 2009-12-08 11:57 ` Masami Hiramatsu
2009-12-09 9:33 ` Ingo Molnar
2009-12-09 9:57 ` [tip:perf/urgent] " tip-bot for Frederic Weisbecker
1 sibling, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2009-12-08 11:57 UTC (permalink / raw)
To: Frederic Weisbecker, Ingo Molnar
Cc: LKML, Lai Jiangshan, Steven Rostedt, Li Zefan
Frederic Weisbecker wrote:
> Ingo,
>
> Please pull the tracing/fixes branch that can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
> tracing/fixes
>
> Thanks,
> Frederic
> ---
>
> Frederic Weisbecker (1):
> tracing/kprobes: Fix field creation's bad error handling
>
>
> kernel/trace/trace_kprobe.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> ---
> From 12e22dfaaee46f70762beb1982a7b86a68317b11 Mon Sep 17 00:00:00 2001
> From: Frederic Weisbecker <fweisbec@gmail.com>
> Date: Tue, 8 Dec 2009 10:00:04 +0100
> Subject: [PATCH] tracing/kprobes: Fix field creation's bad error handling
> Cc: Lai Jiangshan <laijs@cn.fujitsu.com>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@redhat.com>, Li Zefan <lizf@cn.fujitsu.com>
>
> When we define the common event fields in kprobe, we invert the error
> handling and return immediately in case of success. Then we omit
> to define specific kprobes fields (ip and nargs), and specific
> kretprobes fields (func, ret_ip, nargs). And we only define them
> when we fail to create common fields.
>
> The most visible consequence is that we can't create filter for
> k(ret)probes specific fields.
>
> This patch re-invert the success/error handling to fix it.
>
> Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Masami Hiramatsu <mhiramat@redhat.com>
> Cc: Li Zefan <lizf@cn.fujitsu.com>
Thanks for fix that.
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Ingo, I think this should go to tip:urgent.
Thank you,
> ---
> kernel/trace/trace_kprobe.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index aff5f80..ca04523 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -1114,7 +1114,7 @@ static int kprobe_event_define_fields(struct ftrace_event_call *event_call)
> struct trace_probe *tp = (struct trace_probe *)event_call->data;
>
> ret = trace_define_common_fields(event_call);
> - if (!ret)
> + if (ret)
> return ret;
>
> DEFINE_FIELD(unsigned long, ip, FIELD_STRING_IP, 0);
> @@ -1132,7 +1132,7 @@ static int kretprobe_event_define_fields(struct ftrace_event_call *event_call)
> struct trace_probe *tp = (struct trace_probe *)event_call->data;
>
> ret = trace_define_common_fields(event_call);
> - if (!ret)
> + if (ret)
> return ret;
>
> DEFINE_FIELD(unsigned long, func, FIELD_STRING_FUNC, 0);
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] tracing/kprobes: Fix field creation's bad error handling
2009-12-08 11:57 ` Masami Hiramatsu
@ 2009-12-09 9:33 ` Ingo Molnar
0 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2009-12-09 9:33 UTC (permalink / raw)
To: Masami Hiramatsu
Cc: Frederic Weisbecker, LKML, Lai Jiangshan, Steven Rostedt,
Li Zefan
* Masami Hiramatsu <mhiramat@redhat.com> wrote:
> Frederic Weisbecker wrote:
> > Ingo,
> >
> > Please pull the tracing/fixes branch that can be found at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
> > tracing/fixes
> >
> > Thanks,
> > Frederic
> > ---
> >
> > Frederic Weisbecker (1):
> > tracing/kprobes: Fix field creation's bad error handling
> >
> >
> > kernel/trace/trace_kprobe.c | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > ---
> > From 12e22dfaaee46f70762beb1982a7b86a68317b11 Mon Sep 17 00:00:00 2001
> > From: Frederic Weisbecker <fweisbec@gmail.com>
> > Date: Tue, 8 Dec 2009 10:00:04 +0100
> > Subject: [PATCH] tracing/kprobes: Fix field creation's bad error handling
> > Cc: Lai Jiangshan <laijs@cn.fujitsu.com>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@redhat.com>, Li Zefan <lizf@cn.fujitsu.com>
> >
> > When we define the common event fields in kprobe, we invert the error
> > handling and return immediately in case of success. Then we omit
> > to define specific kprobes fields (ip and nargs), and specific
> > kretprobes fields (func, ret_ip, nargs). And we only define them
> > when we fail to create common fields.
> >
> > The most visible consequence is that we can't create filter for
> > k(ret)probes specific fields.
> >
> > This patch re-invert the success/error handling to fix it.
> >
> > Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> > Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Cc: Masami Hiramatsu <mhiramat@redhat.com>
> > Cc: Li Zefan <lizf@cn.fujitsu.com>
>
> Thanks for fix that.
>
> Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
>
>
> Ingo, I think this should go to tip:urgent.
Will apply, thanks guys!
Ingo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/urgent] tracing/kprobes: Fix field creation's bad error handling
2009-12-08 9:16 [GIT PULL] tracing/kprobes: Fix field creation's bad error handling Frederic Weisbecker
2009-12-08 11:57 ` Masami Hiramatsu
@ 2009-12-09 9:57 ` tip-bot for Frederic Weisbecker
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2009-12-09 9:57 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, lizf, fweisbec, rostedt, tglx, laijs,
mhiramat, mingo
Commit-ID: 822a6961112f0c9101d3359d8524604c3309ee6c
Gitweb: http://git.kernel.org/tip/822a6961112f0c9101d3359d8524604c3309ee6c
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Tue, 8 Dec 2009 10:00:04 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 9 Dec 2009 10:32:21 +0100
tracing/kprobes: Fix field creation's bad error handling
When we define the common event fields in kprobe, we invert the error
handling and return immediately in case of success. Then we omit
to define specific kprobes fields (ip and nargs), and specific
kretprobes fields (func, ret_ip, nargs). And we only define them
when we fail to create common fields.
The most visible consequence is that we can't create filter for
k(ret)probes specific fields.
This patch re-invert the success/error handling to fix it.
Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <1260263815-5167-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/trace_kprobe.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index bf05fb4..b52d397 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1133,7 +1133,7 @@ static int kprobe_event_define_fields(struct ftrace_event_call *event_call)
struct trace_probe *tp = (struct trace_probe *)event_call->data;
ret = trace_define_common_fields(event_call);
- if (!ret)
+ if (ret)
return ret;
DEFINE_FIELD(unsigned long, ip, FIELD_STRING_IP, 0);
@@ -1151,7 +1151,7 @@ static int kretprobe_event_define_fields(struct ftrace_event_call *event_call)
struct trace_probe *tp = (struct trace_probe *)event_call->data;
ret = trace_define_common_fields(event_call);
- if (!ret)
+ if (ret)
return ret;
DEFINE_FIELD(unsigned long, func, FIELD_STRING_FUNC, 0);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-09 9:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08 9:16 [GIT PULL] tracing/kprobes: Fix field creation's bad error handling Frederic Weisbecker
2009-12-08 11:57 ` Masami Hiramatsu
2009-12-09 9:33 ` Ingo Molnar
2009-12-09 9:57 ` [tip:perf/urgent] " tip-bot for Frederic Weisbecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox