rcu: Add lockdep_assert_in_rcu_read_lock() and friends
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 16 Mar 2024 07:10:15 +0000 (00:10 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 4 Jun 2024 00:24:58 +0000 (17:24 -0700)
commit32d99593bdc91442fe6183d97b060210cc9c8193
treebc3a9c7b94c2ed2a8094ae3065bdc665c3af3b7c
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
rcu: Add lockdep_assert_in_rcu_read_lock() and friends

There is no direct RCU counterpart to lockdep_assert_irqs_disabled()
and friends.  Although it is possible to construct them, it would
be more convenient to have the following lockdep assertions:

lockdep_assert_in_rcu_read_lock()
lockdep_assert_in_rcu_read_lock_bh()
lockdep_assert_in_rcu_read_lock_sched()
lockdep_assert_in_rcu_reader()

This commit therefore creates them.

Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/rcupdate.h