lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c62985530901150232j5623ace0uc458dd3686ed105e@mail.gmail.com>
Date:	Thu, 15 Jan 2009 11:32:17 +0100
From:	"Frédéric Weisbecker" <fweisbec@...il.com>
To:	"Li Zefan" <lizf@...fujitsu.com>
Cc:	"Steven Rostedt" <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"Ingo Molnar" <mingo@...e.hu>
Subject: Re: [PATCH] tracing/ftrace: add missing unlock in register_stat_tracer()

2009/1/15 Li Zefan <lizf@...fujitsu.com>:
> We should unlock all_stat_sessions_mutex before returning failure.


Ouch.... Thanks Li!


> Signed-off-by: Li Zefan <lizf@...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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ