Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'rcu-urgent.2022.12.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu

Pull RCU fix from Paul McKenney:
"This fixes a lockdep false positive in synchronize_rcu() that can
otherwise occur during early boot.

The fix simply avoids invoking lockdep if the scheduler has not yet
been initialized, that is, during that portion of boot when interrupts
are disabled"

* tag 'rcu-urgent.2022.12.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
rcu: Don't assert interrupts enabled too early in boot

+6 -4
+6 -4
kernel/rcu/tree.c
··· 1362 1362 { 1363 1363 struct rcu_node *rnp = rcu_get_root(); 1364 1364 1365 - if (rcu_init_invoked()) 1365 + if (rcu_scheduler_active != RCU_SCHEDULER_INACTIVE) 1366 1366 raw_lockdep_assert_held_rcu_node(rnp); 1367 1367 1368 1368 // If RCU was idle, note beginning of GP. ··· 1378 1378 { 1379 1379 struct rcu_node *rnp = rcu_get_root(); 1380 1380 1381 - if (rcu_init_invoked()) 1381 + if (rcu_scheduler_active != RCU_SCHEDULER_INACTIVE) 1382 1382 raw_lockdep_assert_held_rcu_node(rnp); 1383 1383 1384 1384 // If the previously noted GP is still in effect, record the ··· 1401 1401 struct rcu_node *rnp = rcu_get_root(); 1402 1402 1403 1403 if (rcu_init_invoked()) { 1404 - lockdep_assert_irqs_enabled(); 1404 + if (rcu_scheduler_active != RCU_SCHEDULER_INACTIVE) 1405 + lockdep_assert_irqs_enabled(); 1405 1406 raw_spin_lock_irqsave_rcu_node(rnp, flags); 1406 1407 } 1407 1408 rcu_poll_gp_seq_start(snap); ··· 1418 1417 struct rcu_node *rnp = rcu_get_root(); 1419 1418 1420 1419 if (rcu_init_invoked()) { 1421 - lockdep_assert_irqs_enabled(); 1420 + if (rcu_scheduler_active != RCU_SCHEDULER_INACTIVE) 1421 + lockdep_assert_irqs_enabled(); 1422 1422 raw_spin_lock_irqsave_rcu_node(rnp, flags); 1423 1423 } 1424 1424 rcu_poll_gp_seq_end(snap);