[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1375290972.5418.7.camel@gandalf.local.home>
Date: Wed, 31 Jul 2013 13:16:12 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Alexander Z Lam <azl@...gle.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
David Sharp <dhsharp@...gle.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Vaibhav Nagarnaik <vnagarnaik@...gle.com>,
"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] tracing: trace_remove_event_call() should fail
if call/file is in use
On Wed, 2013-07-31 at 12:50 -0400, Steven Rostedt wrote:
> On Mon, 2013-07-29 at 19:50 +0200, Oleg Nesterov wrote:
> >
> > +static int probe_remove_event_call(struct ftrace_event_call *call)
> > +{
> > + struct trace_array *tr;
> > + struct ftrace_event_file *file;
> > +
> > +#ifdef CONFIG_PERF_EVENTS
> > + if (call->perf_refcount)
> > + return -EBUSY;
> > +#endif
> > + do_for_each_event_file(tr, file) {
> > + if (file->event_call != call)
> > + continue;
> > + /*
> > + * We can't rely on ftrace_event_enable_disable(enable => 0)
> > + * we are going to do, FTRACE_EVENT_FL_SOFT_MODE can suppress
> > + * TRACE_REG_UNREGISTER.
> > + */
> > + if (file->flags & FTRACE_EVENT_FL_ENABLED)
> > + return -EBUSY;
> > + break;
>
> I'm going to modify the patch to include a comment here about the break
> being used to go to the next trace_array and not leaving the loop.
>
Screw it, I'm going to just add a separate patch to include it.
-- Steve
--
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