rcu: Make rcu_is_watching() really notrace
authorAlexei Starovoitov <ast@plumgrid.com>
Tue, 16 Jun 2015 17:35:18 +0000 (10:35 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 22 Jul 2015 22:27:31 +0000 (15:27 -0700)
Although rcu_is_watching() is marked notrace, it invokes preempt_disable()
and preempt_enable(), both of which can be traced.  This defeats the
purpose of the notrace on rcu_is_watching(), so this commit substitutes
preempt_disable_notrace() and preempt_enable_notrace().

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
kernel/rcu/tree.c

index 9629298..cb64d7e 100644 (file)
@@ -978,9 +978,9 @@ bool notrace rcu_is_watching(void)
 {
        bool ret;
 
-       preempt_disable();
+       preempt_disable_notrace();
        ret = __rcu_is_watching();
-       preempt_enable();
+       preempt_enable_notrace();
        return ret;
 }
 EXPORT_SYMBOL_GPL(rcu_is_watching);