diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2024-03-06 19:21:47 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-05 09:08:20 +0200 |
commit | 075fc5d20cdadf6c34b528d7c6a8aeb3ee3c1722 (patch) | |
tree | de7134065d4a4684889a2221e803c3e03d1d464e /kernel | |
parent | f51f449e7df36700efa5fb7a4f8201cec9986ddb (diff) | |
download | linux-075fc5d20cdadf6c34b528d7c6a8aeb3ee3c1722.tar.gz linux-075fc5d20cdadf6c34b528d7c6a8aeb3ee3c1722.tar.bz2 linux-075fc5d20cdadf6c34b528d7c6a8aeb3ee3c1722.zip |
rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment
[ 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 <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/lkml/CAHk-=wi7rJ-eGq+xaxVfzFEgbL9tdf6Kc8Z89rCpfcQOKm74Tw@mail.gmail.com/
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcu/rcutorture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 3c9feca1eab1..aef4d01c4f61 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -1291,7 +1291,8 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp) preempt_disable(); pipe_count = p->rtort_pipe_count; if (pipe_count > RCU_TORTURE_PIPE_LEN) { - /* Should not happen, but... */ + // Should not happen in a correct RCU implementation, + // happens quite often for torture_type=busted. pipe_count = RCU_TORTURE_PIPE_LEN; } completed = cur_ops->get_gp_seq(); |