Messages in this thread | | | Date | Tue, 24 Jan 2012 02:26:42 +0100 | From | Frederic Weisbecker <> | Subject | Re: [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); > > +}
| |