rcutorture: NULL rcu_torture_current earlier in cleanup code
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 27 Apr 2020 02:20:37 +0000 (19:20 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 29 Jun 2020 19:01:44 +0000 (12:01 -0700)
commitcae7cc6ba5bad320c2055ac54f73affd051e76ca
treed9359ea1f0089851c7fbc8c78e211853aacf8426
parent59359e4f2a0906920389ec1e33296ac9a19178ba
rcutorture: NULL rcu_torture_current earlier in cleanup code

Currently, the rcu_torture_current variable remains non-NULL until after
all readers have stopped.  During this time, rcu_torture_stats_print()
will think that the test is still ongoing, which can result in confusing
dmesg output.  This commit therefore NULLs rcu_torture_current immediately
after the rcu_torture_writer() kthread has decided to stop, thus informing
rcu_torture_stats_print() much sooner.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c