[GIT PULL] Avoid synchronize_rcu() false positives in semi-early boot

From: Paul E. McKenney
Date: Mon Dec 19 2022 - 20:42:59 EST


Hello, Linus,

Another merge window, another fix for another regression noted by Steve
Rostedt. In the true spirit of closing the barn door after the horse
has escaped, the following commit is queued on -rcu to detect this sort
of bug in the future:

f13c14392ebc ("rcu: Test synchronous RCU grace periods at the end of rcu_init()")

The fix simply avoids consulting lockdep about interrupts-disabled
state before the scheduler has been initialized. After all, before that
time, it is perfectly legal to invoke synchronize_rcu() with interrupts
disabled.

The following changes since commit 31d8aaa87fcef1be5932f3813ea369e21bd3b11d:

rcu: Keep synchronize_rcu() from enabling irqs in early boot (2022-10-20 15:34:49 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/rcu-urgent.2022.12.17a

for you to fetch changes up to 3f6c3d29df58f391cf487b50a24ebd24045ba569:

rcu: Don't assert interrupts enabled too early in boot (2022-12-17 16:12:20 -0800)

----------------------------------------------------------------
Urgent RCU pull request for v6.2

This commit fixes a lockdep false positive in synchronize_rcu() that
can otherwise occur during early boot. Theis fix simply avoids invoking
lockdep if the scheduler has not yet been initialized, that is, during
that portion of boot when interrupts are disabled.

----------------------------------------------------------------
Paul E. McKenney (1):
rcu: Don't assert interrupts enabled too early in boot

kernel/rcu/tree.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)