lkml.org 
[lkml]   [2013]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 01/10] tracing: Add support for SOFT_DISABLE to syscall events
On Tue, 27 Aug 2013 18:29:06 -0500
Tom Zanussi <tom.zanussi@linux.intel.com> wrote:

> On Tue, 2013-08-27 at 16:01 -0400, Steven Rostedt wrote:
> > On Tue, 27 Aug 2013 14:40:13 -0500
> > Tom Zanussi <tom.zanussi@linux.intel.com> wrote:
> >
> > return;
> > > - if (!test_bit(syscall_nr, tr->enabled_enter_syscalls))
> > > +
> > > + /* Here we're inside the tp handler's rcu_read_lock (__DO_TRACE()) */
> > > + ftrace_file = rcu_dereference_raw(tr->enter_syscall_files[syscall_nr]);
> >
> > What's the reason for using rcu_dereference_raw() and not normal
> > rcu_dereference?
> >
>
> This is because we know the tracepoint handler has rcu_read_lock_held()
> and so we don't need to do the rcu_dereference_check().
>

That's not the point of raw(). What happens if in the future we modify
the code and this is called without rcu_read_lock held? Then we just
took away the debug check. Please do not circumvent any debug unless
there's a reason for it. The function tracer does circumvent these
checks because the debug checks can cause the function tracer to hang
the box. Kind of killing the point of debug checks ;-)

Anyway, this should be rcu_derefence() not rcu_dereference_raw().

-- Steve


\
 
 \ /
  Last update: 2013-08-28 02:01    [W:0.061 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site