OSDN Git Service

rcu/nocb: Add missing annotation for rcu_nocb_bypass_unlock()
authorJules Irenge <jbi.octave@gmail.com>
Thu, 30 Jan 2020 00:30:09 +0000 (00:30 +0000)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 20 Feb 2020 23:58:23 +0000 (15:58 -0800)
Sparse reports warning at rcu_nocb_bypass_unlock()

warning: context imbalance in rcu_nocb_bypass_unlock() - unexpected unlock

The root cause is a missing annotation of rcu_nocb_bypass_unlock()
which causes the warning.

This commit therefore adds the missing __releases(&rdp->nocb_bypass_lock)
annotation.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
kernel/rcu/tree_plugin.h

index 6db2cad..3846519 100644 (file)
@@ -1530,6 +1530,7 @@ static bool rcu_nocb_bypass_trylock(struct rcu_data *rdp)
  * Release the specified rcu_data structure's ->nocb_bypass_lock.
  */
 static void rcu_nocb_bypass_unlock(struct rcu_data *rdp)
+       __releases(&rdp->nocb_bypass_lock)
 {
        lockdep_assert_irqs_disabled();
        raw_spin_unlock(&rdp->nocb_bypass_lock);