rcutorture: Make synctype[] and nsynctype be static global
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 17 Nov 2020 00:46:06 +0000 (16:46 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 7 Jan 2021 01:17:10 +0000 (17:17 -0800)
commit18fbf307b7319af3725c36e16af6ae9f35a8699c
tree5fbed42b404e2c2bb4e8c04e9374689fb3ebf02b
parent12a910e3cd3d11e00b2a2df24ea995ffa3e27ae5
rcutorture: Make synctype[] and nsynctype be static global

Full testing of the new SRCU polling API requires that the fake writers
also use it in order to test concurrent calls to all of the API members,
especially start_poll_synchronize_srcu().  This commit prepares the ground
for this by making the synctype[] and nsynctype variables be static
globals so that the rcu_torture_fakewriter() function can access them.
Initialization of these variables is moved from rcu_torture_writer()
to a new rcu_torture_write_types() function that is invoked from
rcu_torture_init() just before the first writer kthread is spawned.

Link: https://lore.kernel.org/rcu/20201112201547.GF3365678@moria.home.lan/
Reported-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c