diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-02-04 19:56:41 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-02-21 02:58:23 +0300 |
commit | 13817dd589f426aee9c36e3670e7cb2a7f067d23 (patch) | |
tree | 04db373437f324185df6a764d9a825282495e2ad /kernel/rcu | |
parent | faa059c397dec8a452c79e9dba64419113ea64e2 (diff) | |
download | linux-13817dd589f426aee9c36e3670e7cb2a7f067d23.tar.xz |
rcu: Tighten rcu_lockdep_assert_cblist_protected() check
The ->nocb_lock lockdep assertion is currently guarded by cpu_online(),
which is incorrect for no-CBs CPUs, whose callback lists must be
protected by ->nocb_lock regardless of whether or not the corresponding
CPU is online. This situation could result in failure to detect bugs
resulting from failing to hold ->nocb_lock for offline CPUs.
This commit therefore removes the cpu_online() guard.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 384651915d74..70b3c0f4ea37 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -1579,8 +1579,7 @@ static void rcu_nocb_unlock_irqrestore(struct rcu_data *rdp, static void rcu_lockdep_assert_cblist_protected(struct rcu_data *rdp) { lockdep_assert_irqs_disabled(); - if (rcu_segcblist_is_offloaded(&rdp->cblist) && - cpu_online(rdp->cpu)) + if (rcu_segcblist_is_offloaded(&rdp->cblist)) lockdep_assert_held(&rdp->nocb_lock); } |