Skip to content

Commit a7ce455

Browse files
paulmckrcuroxanan1996
authored andcommitted
rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment
BugLink: https://bugs.launchpad.net/bugs/2073765 [ Upstream commit 8b9b443fa860276822b25057cb3ff3b28734dec0 ] 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]> Signed-off-by: Portia Stephens <[email protected]> Signed-off-by: Roxana Nicolescu <[email protected]>
1 parent fd9d291 commit a7ce455

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/rcu/rcutorture.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,8 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp, long myid)
16041604
preempt_disable();
16051605
pipe_count = READ_ONCE(p->rtort_pipe_count);
16061606
if (pipe_count > RCU_TORTURE_PIPE_LEN) {
1607-
/* Should not happen, but... */
1607+
// Should not happen in a correct RCU implementation,
1608+
// happens quite often for torture_type=busted.
16081609
pipe_count = RCU_TORTURE_PIPE_LEN;
16091610
}
16101611
completed = cur_ops->get_gp_seq();

0 commit comments

Comments
 (0)