lkml.org 
[lkml]   [2013]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] tracing/uprobes: Support ftrace_event_file base multibuffer
From
Date
On Fri, 2013-06-14 at 09:21 -0700, Paul E. McKenney wrote:

> > > > @@ -548,15 +556,35 @@ static void uprobe_trace_print(struct trace_uprobe *tu,
> > > > /* uprobe handler */
> > > > static int uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs)
> > > > {
> > > > - if (!is_ret_probe(tu))
> > > > - uprobe_trace_print(tu, 0, regs);
> > > > + struct ftrace_event_file **file;
> > > > +
> > > > + if (is_ret_probe(tu))
> > > > + return 0;
> > > > +
> > > > + file = rcu_dereference_raw(tu->files);
> >
> > Why are you using rcu_dereference_raw() and not rcu_dereference(). The
> > _raw() is a bit special, and unless you know what you are doing with RCU
> > here, don't use it.
> >
> > As I see you using rcu_dereference_raw() all over this patch, along with
> > mutexes, I believe that you are not using RCU correctly here.
>
> If irqs and preempt are disabled, I suggest using rcu_dereference_sched().
> That is what it is there for. ;-)
>

I believe this just copied what kprobes did, where irqs and preemption
is disabled. I don't believe that these probes have that same luxury.

But that begs the question. Should we convert the rcu_dereference_raw()
in the kprobe code to rcu_dereference_sched()?

-- Steve




\
 
 \ /
  Last update: 2013-06-14 19:01    [W:0.582 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site