rcu: Mark loads from rcu_state.n_online_cpus
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 8 Mar 2024 04:14:55 +0000 (20:14 -0800)
committerUladzislau Rezki (Sony) <urezki@gmail.com>
Mon, 15 Apr 2024 14:48:26 +0000 (16:48 +0200)
commit09e077cf22c4302ab4ca7932f56c5a8b20c9e32b
treea3f3e21b7f1c16499eca1e002cd829963f4866bd
parenta542d116bab28b4bcade2f41488f4617373c620f
rcu: Mark loads from rcu_state.n_online_cpus

The rcu_state.n_online_cpus value is only ever updated by CPU-hotplug
operations, which are serialized.  However, this value is read locklessly.
This commit therefore marks those reads.  While in the area, it also
adds ASSERT_EXCLUSIVE_WRITER() calls just in case parallel CPU hotplug
becomes a thing.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
kernel/rcu/tree.c
kernel/rcu/tree_stall.h