This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH tracing/kprobes 3/6] ftrace: Fix trace_remove_event_call() to lock trace_event_mutex
- From: Steven Rostedt <rostedt at goodmis dot org>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Frederic Weisbecker <fweisbec at gmail dot com>, Ingo Molnar <mingo at elte dot hu>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>, Jim Keniston <jkenisto at us dot ibm dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Andi Kleen <ak at linux dot intel dot com>, Christoph Hellwig <hch at infradead dot org>, "Frank Ch. Eigler" <fche at redhat dot com>, "H. Peter Anvin" <hpa at zytor dot com>, Jason Baron <jbaron at redhat dot com>, "K.Prasad" <prasad at linux dot vnet dot ibm dot com>, Lai Jiangshan <laijs at cn dot fujitsu dot com>, Li Zefan <lizf at cn dot fujitsu dot com>, Peter Zijlstra <peterz at infradead dot org>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Tom Zanussi <tzanussi at gmail dot com>
- Date: Tue, 15 Sep 2009 23:17:30 -0400
- Subject: Re: [PATCH tracing/kprobes 3/6] ftrace: Fix trace_remove_event_call() to lock trace_event_mutex
- References: <20090914204847.18779.69409.stgit@dhcp-100-2-132.bos.redhat.com> <20090914204912.18779.68734.stgit@dhcp-100-2-132.bos.redhat.com>
- Reply-to: rostedt at goodmis dot org
On Mon, 2009-09-14 at 16:49 -0400, Masami Hiramatsu wrote:
>
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 38e82a5..a3d6bad 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -1055,6 +1055,9 @@ static void remove_subsystem_dir(const char *name)
> }
> }
>
> +/*
> + * Must be called under locking both of event_mutex and trace_event_mutex.
> + */
> static void __trace_remove_event_call(struct ftrace_event_call *call)
> {
> ftrace_event_enable_disable(call, 0);
> @@ -1071,7 +1074,9 @@ static void __trace_remove_event_call(struct ftrace_event_call *call)
> void trace_remove_event_call(struct ftrace_event_call *call)
Is this from a previous patch set, because I can't find this in either
my tree or tip/master.
-- Steve
> {
> mutex_lock(&event_mutex);
> + down_write(&trace_event_mutex);
> __trace_remove_event_call(call);
> + up_write(&trace_event_mutex);
> mutex_unlock(&event_mutex);
> }
>
>
>