]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rcu: Fix backwards RCU_LOCKDEP_WARN() in synchronize_rcu_tasks()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 30 Jun 2015 15:17:40 +0000 (08:17 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 22 Jul 2015 22:27:33 +0000 (15:27 -0700)
The RCU_LOCKDEP_WARN() in synchronize_rcu_tasks() triggers if the
scheduler is active, which is backwards.  This commit therefore
negates the test.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/update.c

index 47268fb1d27b631ec522098466c0fc26f579475f..7a0b3bc7c5ed147162bec6a600e0bfbded04257d 100644 (file)
@@ -589,7 +589,7 @@ EXPORT_SYMBOL_GPL(call_rcu_tasks);
 void synchronize_rcu_tasks(void)
 {
        /* Complain if the scheduler has not started.  */
-       RCU_LOCKDEP_WARN(rcu_scheduler_active,
+       RCU_LOCKDEP_WARN(!rcu_scheduler_active,
                         "synchronize_rcu_tasks called too soon");
 
        /* Wait for the grace period. */