Skip to content

Commit cae7cc6

Browse files
committed
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 <[email protected]>
1 parent 59359e4 commit cae7cc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/rcutorture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,7 @@ rcu_torture_writer(void *arg)
11721172
WARN(1, "%s: rtort_pipe_count: %d\n", __func__, rcu_tortures[i].rtort_pipe_count);
11731173
}
11741174
} while (!torture_must_stop());
1175+
rcu_torture_current = NULL; // Let stats task know that we are done.
11751176
/* Reset expediting back to unexpedited. */
11761177
if (expediting > 0)
11771178
expediting = -expediting;
@@ -2473,7 +2474,6 @@ rcu_torture_cleanup(void)
24732474
reader_tasks[i]);
24742475
kfree(reader_tasks);
24752476
}
2476-
rcu_torture_current = NULL;
24772477

24782478
if (fakewriter_tasks) {
24792479
for (i = 0; i < nfakewriters; i++) {

0 commit comments

Comments
 (0)