]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rcu: Add lockdep_assert_irqs_disabled() to rcu_exp_need_qs()
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 26 Oct 2024 02:56:20 +0000 (19:56 -0700)
committerUladzislau Rezki (Sony) <urezki@gmail.com>
Sat, 14 Dec 2024 16:10:38 +0000 (17:10 +0100)
Callers to rcu_exp_need_qs() are supposed to disable interrupts, so this
commit enlists lockdep's aid in checking this.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
kernel/rcu/tree_exp.h

index ce5b09921d04e18ae60459d8d020fbb9e783f725..77efed89c79e3519b5cfd3c3eca8d01f9e647764 100644 (file)
@@ -722,6 +722,7 @@ static void rcu_exp_sel_wait_wake(unsigned long s)
 /* Request an expedited quiescent state. */
 static void rcu_exp_need_qs(void)
 {
+       lockdep_assert_irqs_disabled();
        ASSERT_EXCLUSIVE_WRITER_SCOPED(*this_cpu_ptr(&rcu_data.cpu_no_qs.b.exp));
        __this_cpu_write(rcu_data.cpu_no_qs.b.exp, true);
        /* Store .exp before .rcu_urgent_qs. */