rcu: Use READ_ONCE() for lockless read of rnp->qsmask
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Sat, 17 Sep 2022 16:41:58 +0000 (16:41 +0000)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 18 Oct 2022 21:59:57 +0000 (14:59 -0700)
commitaba9645bd10bd9f793732b06495b1312ee44865e
tree00b6009b63c84f16c3f25cdc8322ca91861fa8ba
parentb5ad0d2e8832c770b3ff2887ae37b47f42a3ab82
rcu: Use READ_ONCE() for lockless read of rnp->qsmask

The rnp->qsmask is locklessly accessed from rcutree_dying_cpu(). This
may help avoid load tearing due to concurrent access, KCSAN
issues, and preserve sanity of people reading the mask in tracing.

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c