Skip to content

Commit 02b51a1

Browse files
committed
rcutorture: Add end-of-test check to rcu_torture_fwd_prog() loop
The second and subsequent forward-progress kthreads loop waiting for the first forward-progress kthread to start the next test interval. Unfortunately, if the test ends while one of those kthreads is waiting, the test will hang. This hang occurs because that wait loop fails to check for the end of the test. This commit therefore adds an end-of-test check to that wait loop. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent e22ef8d commit 02b51a1

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
@@ -2515,7 +2515,7 @@ static int rcu_torture_fwd_prog(void *args)
25152515
firsttime = false;
25162516
WRITE_ONCE(rcu_fwd_seq, rcu_fwd_seq + 1);
25172517
} else {
2518-
while (READ_ONCE(rcu_fwd_seq) == oldseq)
2518+
while (READ_ONCE(rcu_fwd_seq) == oldseq && !torture_must_stop())
25192519
schedule_timeout_interruptible(1);
25202520
oldseq = READ_ONCE(rcu_fwd_seq);
25212521
}

0 commit comments

Comments
 (0)