Skip to content

Commit 13817dd

Browse files
committed
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 <[email protected]>
1 parent faa059c commit 13817dd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/rcu/tree_plugin.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,8 +1579,7 @@ static void rcu_nocb_unlock_irqrestore(struct rcu_data *rdp,
15791579
static void rcu_lockdep_assert_cblist_protected(struct rcu_data *rdp)
15801580
{
15811581
lockdep_assert_irqs_disabled();
1582-
if (rcu_segcblist_is_offloaded(&rdp->cblist) &&
1583-
cpu_online(rdp->cpu))
1582+
if (rcu_segcblist_is_offloaded(&rdp->cblist))
15841583
lockdep_assert_held(&rdp->nocb_lock);
15851584
}
15861585

0 commit comments

Comments
 (0)