rcutorture: Check for no up/down readers at task level
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 8 May 2025 23:45:00 +0000 (16:45 -0700)
committerNeeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
Wed, 25 Jun 2025 03:09:01 +0000 (08:39 +0530)
commitf6c8785f50443db4c70faebfc22e59e8064c35a5
tree09de4a6c58f62d7020dc62f85ebac1ee56cc6b93
parent93856948be8f5d784a28cfb2eb16884a5522faaa
rcutorture: Check for no up/down readers at task level

The design of testing of up/down readers such as srcu_down_read()
and srcu_up_read() assumes that these are tested only by the
rcu_torture_updown() kthread, and never by the rcu_torture_reader()
kthread.  Because we all know which road is paved with good intentions,
this commit adds WARN_ON_ONCE() to verify that things are going to plan.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
kernel/rcu/rcutorture.c