rcutorture: ASSERT_EXCLUSIVE_WRITER() for ->rtort_pipe_count updates
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 7 Mar 2024 01:00:39 +0000 (17:00 -0800)
committerUladzislau Rezki (Sony) <urezki@gmail.com>
Tue, 9 Apr 2024 13:10:13 +0000 (15:10 +0200)
commitc507e195016ccca18e375d14cfeb1186dac60b2c
tree4aeb24bab9f5e29d5b6b9bd3bb773cad26310297
parentf8039457eedc378fa7a186054ee3032b8a41eaee
rcutorture: ASSERT_EXCLUSIVE_WRITER() for ->rtort_pipe_count updates

It turns out that only one CPU at a time will ever invoke
rcu_torture_pipe_update_one() on a given rcu_torture structure.
This commit therefore adds three ASSERT_EXCLUSIVE_WRITER() calls
to enlist KCSAN's aid in checking this.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
kernel/rcu/rcutorture.c