lkml.org 
[lkml]   [2021]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 7/7] tracing: Add a probe that attaches to trace events
On Thu, 19 Aug 2021 12:56:52 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> > static bool find_event_probe(const char *group, const char *event)
> > {
> > struct dyn_event *ev;
> > struct trace_eprobe *ep;
> >
> > for_each_dyn_event(ev) {
> > if (ev->ops != &eprobe_dyn_event_ops)
> > continue;
> >
> > ep = to_trace_eprobe(ev);
> > if (strcmp(ep->tp.event->class.system, group) == 0 &&
> > strcmp(ep->tp.event->call.name, event) == 0)
> > return true;
> > }
> > return false;
> > }
>
> Yeah, but I think this should be done with event_mutex, shouldn't it?

Probably. I noticed that it was updated under the dyn_event_ops_mutex,
and thought that was enough protection. But I now see the lockdep
assert on the event_mutex in the other functions.

Is there ever a case where this list is updated without
dyn_event_ops_mutex held?

-- Steve

\
 
 \ /
  Last update: 2021-08-19 06:05    [W:0.054 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site