* [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
@ 2009-01-15 1:30 Li Zefan
2009-01-15 1:52 ` Steven Rostedt
2009-01-15 10:32 ` Frédéric Weisbecker
0 siblings, 2 replies; 9+ messages in thread
From: Li Zefan @ 2009-01-15 1:30 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Frederic Weisbecker, LKML
We should unlock all_stat_sessions_mutex before returning failure.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
I noticed Ingo tend to delete the impact line from my changelog
if it added nothing new to the title, so no impact line for this
patch. :)
---
kernel/trace/trace_stat.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
index cb29282..8669f3c 100644
--- a/kernel/trace/trace_stat.c
+++ b/kernel/trace/trace_stat.c
@@ -73,8 +73,10 @@ int register_stat_tracer(struct tracer_stat *trace)
/* Already registered? */
mutex_lock(&all_stat_sessions_mutex);
list_for_each_entry_safe(node, tmp, &all_stat_sessions, session_list) {
- if (node->ts == trace)
+ if (node->ts == trace) {
+ mutex_unlock(all_stat_sessions_mutex);
return -EINVAL;
+ }
}
mutex_unlock(&all_stat_sessions_mutex);
--
1.5.4.rc3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
2009-01-15 1:30 [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer() Li Zefan
@ 2009-01-15 1:52 ` Steven Rostedt
2009-01-15 10:32 ` Frédéric Weisbecker
1 sibling, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2009-01-15 1:52 UTC (permalink / raw)
To: Li Zefan; +Cc: Frederic Weisbecker, LKML
On Thu, 15 Jan 2009, Li Zefan wrote:
> We should unlock all_stat_sessions_mutex before returning failure.
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Thanks, applied.
-- Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
@ 2009-01-15 1:57 Steven Rostedt
2009-01-15 10:02 ` Ingo Molnar
2009-01-15 10:25 ` Steven Rostedt
0 siblings, 2 replies; 9+ messages in thread
From: Steven Rostedt @ 2009-01-15 1:57 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Frédéric Weisbecker, Li Zefan,
Andrew Morton
Ingo,
The following patch is in:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
branch: tip/devel
Li Zefan (1):
tracing/ftrace: add missing unlock in register_stat_tracer()
----
kernel/trace/trace_stat.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---------------------------
commit 6af81ac4701bf80dde4b723f28a777daefdf512c
Author: Li Zefan <lizf@cn.fujitsu.com>
Date: Thu Jan 15 09:30:52 2009 +0800
tracing/ftrace: add missing unlock in register_stat_tracer()
We should unlock all_stat_sessions_mutex before returning failure.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
index cb29282..8669f3c 100644
--- a/kernel/trace/trace_stat.c
+++ b/kernel/trace/trace_stat.c
@@ -73,8 +73,10 @@ int register_stat_tracer(struct tracer_stat *trace)
/* Already registered? */
mutex_lock(&all_stat_sessions_mutex);
list_for_each_entry_safe(node, tmp, &all_stat_sessions, session_list) {
- if (node->ts == trace)
+ if (node->ts == trace) {
+ mutex_unlock(all_stat_sessions_mutex);
return -EINVAL;
+ }
}
mutex_unlock(&all_stat_sessions_mutex);
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
2009-01-15 1:57 Steven Rostedt
@ 2009-01-15 10:02 ` Ingo Molnar
2009-01-15 10:14 ` Steven Rostedt
2009-01-15 10:25 ` Steven Rostedt
1 sibling, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2009-01-15 10:02 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Frédéric Weisbecker, Li Zefan, Andrew Morton
* Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Ingo,
>
> The following patch is in:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
>
> branch: tip/devel
>
>
> Li Zefan (1):
> tracing/ftrace: add missing unlock in register_stat_tracer()
hm, not there yet - forgot to push out?
Ingo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
2009-01-15 10:02 ` Ingo Molnar
@ 2009-01-15 10:14 ` Steven Rostedt
0 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2009-01-15 10:14 UTC (permalink / raw)
To: Ingo Molnar; +Cc: LKML, Frédéric Weisbecker, Li Zefan, Andrew Morton
On Thu, 15 Jan 2009, Ingo Molnar wrote:
>
> * Steven Rostedt <rostedt@goodmis.org> wrote:
>
> >
> > Ingo,
> >
> > The following patch is in:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> >
> > branch: tip/devel
> >
> >
> > Li Zefan (1):
> > tracing/ftrace: add missing unlock in register_stat_tracer()
>
> hm, not there yet - forgot to push out?
Yep, sorry ;-)
Pushed, may take a few minutes to sync.
-- Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
2009-01-15 1:57 Steven Rostedt
2009-01-15 10:02 ` Ingo Molnar
@ 2009-01-15 10:25 ` Steven Rostedt
2009-01-15 10:26 ` Steven Rostedt
2009-01-15 10:28 ` Ingo Molnar
1 sibling, 2 replies; 9+ messages in thread
From: Steven Rostedt @ 2009-01-15 10:25 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Frédéric Weisbecker, Li Zefan,
Andrew Morton
Ingo, revert this patch (or don't pull it yet)
I just noticed that it does not compile. I should not be doing git pulls
at night :-(
On Wed, 14 Jan 2009, Steven Rostedt wrote:
>
> Ingo,
>
> The following patch is in:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
>
> branch: tip/devel
>
>
> Li Zefan (1):
> tracing/ftrace: add missing unlock in register_stat_tracer()
>
> ----
> kernel/trace/trace_stat.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
> ---------------------------
> commit 6af81ac4701bf80dde4b723f28a777daefdf512c
> Author: Li Zefan <lizf@cn.fujitsu.com>
> Date: Thu Jan 15 09:30:52 2009 +0800
>
> tracing/ftrace: add missing unlock in register_stat_tracer()
>
> We should unlock all_stat_sessions_mutex before returning failure.
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
>
> diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
> index cb29282..8669f3c 100644
> --- a/kernel/trace/trace_stat.c
> +++ b/kernel/trace/trace_stat.c
> @@ -73,8 +73,10 @@ int register_stat_tracer(struct tracer_stat *trace)
> /* Already registered? */
> mutex_lock(&all_stat_sessions_mutex);
> list_for_each_entry_safe(node, tmp, &all_stat_sessions, session_list) {
> - if (node->ts == trace)
> + if (node->ts == trace) {
> + mutex_unlock(all_stat_sessions_mutex);
missing &
-- Steve
> return -EINVAL;
> + }
> }
> mutex_unlock(&all_stat_sessions_mutex);
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
2009-01-15 10:25 ` Steven Rostedt
@ 2009-01-15 10:26 ` Steven Rostedt
2009-01-15 10:28 ` Ingo Molnar
1 sibling, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2009-01-15 10:26 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Frédéric Weisbecker, Li Zefan,
Andrew Morton
On Thu, 15 Jan 2009, Steven Rostedt wrote:
>
> Ingo, revert this patch (or don't pull it yet)
> I just noticed that it does not compile. I should not be doing git pulls
> at night :-(
Probably explains why I did not push it. I think I noticed it last night,
but sent out the email by mistake. I was too tired to fix it up.
-- Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
2009-01-15 10:25 ` Steven Rostedt
2009-01-15 10:26 ` Steven Rostedt
@ 2009-01-15 10:28 ` Ingo Molnar
1 sibling, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2009-01-15 10:28 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Frédéric Weisbecker, Li Zefan, Andrew Morton
* Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Ingo, revert this patch (or don't pull it yet) I just noticed that it
> does not compile. I should not be doing git pulls at night :-(
you just caught me in the middle of writing up a bugreport ;-)
kernel/trace/trace_stat.c:77: error: incompatible type for argument 1 of 'mutex_unlock'
easy enough to fix - and i did that.
Ingo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()
2009-01-15 1:30 [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer() Li Zefan
2009-01-15 1:52 ` Steven Rostedt
@ 2009-01-15 10:32 ` Frédéric Weisbecker
1 sibling, 0 replies; 9+ messages in thread
From: Frédéric Weisbecker @ 2009-01-15 10:32 UTC (permalink / raw)
To: Li Zefan; +Cc: Steven Rostedt, LKML, Ingo Molnar
2009/1/15 Li Zefan <lizf@cn.fujitsu.com>:
> We should unlock all_stat_sessions_mutex before returning failure.
Ouch.... Thanks Li!
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
>
> I noticed Ingo tend to delete the impact line from my changelog
> if it added nothing new to the title, so no impact line for this
> patch. :)
>
> ---
> kernel/trace/trace_stat.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
> index cb29282..8669f3c 100644
> --- a/kernel/trace/trace_stat.c
> +++ b/kernel/trace/trace_stat.c
> @@ -73,8 +73,10 @@ int register_stat_tracer(struct tracer_stat *trace)
> /* Already registered? */
> mutex_lock(&all_stat_sessions_mutex);
> list_for_each_entry_safe(node, tmp, &all_stat_sessions, session_list) {
> - if (node->ts == trace)
> + if (node->ts == trace) {
> + mutex_unlock(all_stat_sessions_mutex);
> return -EINVAL;
> + }
> }
> mutex_unlock(&all_stat_sessions_mutex);
>
> --
> 1.5.4.rc3
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-01-15 10:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 1:30 [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer() Li Zefan
2009-01-15 1:52 ` Steven Rostedt
2009-01-15 10:32 ` Frédéric Weisbecker
-- strict thread matches above, loose matches on Subject: below --
2009-01-15 1:57 Steven Rostedt
2009-01-15 10:02 ` Ingo Molnar
2009-01-15 10:14 ` Steven Rostedt
2009-01-15 10:25 ` Steven Rostedt
2009-01-15 10:26 ` Steven Rostedt
2009-01-15 10:28 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox