Skip to content

Commit 70d3663

Browse files
paulmckrcuAvenger-285714
authored andcommitted
rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment
[ Upstream commit 8b9b443 ] The "pipe_count > RCU_TORTURE_PIPE_LEN" check has a comment saying "Should not happen, but...". This is only true when testing an RCU whose grace periods are always long enough. This commit therefore fixes this comment. Reported-by: Linus Torvalds <[email protected]> Closes: https://lore.kernel.org/lkml/CAHk-=wi7rJ-eGq+xaxVfzFEgbL9tdf6Kc8Z89rCpfcQOKm74Tw@mail.gmail.com/ Signed-off-by: Paul E. McKenney <[email protected]> Signed-off-by: Uladzislau Rezki (Sony) <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent bcd68d8 commit 70d3663

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/rcu/rcutorture.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,8 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp, long myid)
19921992
preempt_disable();
19931993
pipe_count = READ_ONCE(p->rtort_pipe_count);
19941994
if (pipe_count > RCU_TORTURE_PIPE_LEN) {
1995-
/* Should not happen, but... */
1995+
// Should not happen in a correct RCU implementation,
1996+
// happens quite often for torture_type=busted.
19961997
pipe_count = RCU_TORTURE_PIPE_LEN;
19971998
}
19981999
completed = cur_ops->get_gp_seq();

0 commit comments

Comments
 (0)