lkml.org 
[lkml]   [2012]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/8] ftrace: Add enable/disable ftrace_ops control interface
On Wed, Dec 21, 2011 at 11:01:33AM -0500, Steven Rostedt wrote:
> On Wed, 2011-12-21 at 12:48 +0100, Jiri Olsa wrote:
> > +static int control_ops_is_disabled(struct ftrace_ops *ops)
> > +{
> > + atomic_t *disabled = this_cpu_ptr(ops->disabled);
>
> Again, the use of "this_cpu_ptr" is wrong. Gah! We should nuke all of
> that crap.
>

Is it? It includes the preemption check if CONFIG_DEBUG_PREEMPT, just
like __get_cpu_var()

Just saying that because in a later version of this patch, Jiri used
per_cpu_ptr(ops->disabled, cpu). And this is the wrong thing to do
given that we always fetch the local pointer and per_cpu_ptr() doesn't
check for preemption disabled.


> > + return atomic_read(disabled);
> > +}



\
 
 \ /
  Last update: 2012-01-24 02:29    [W:0.068 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site