From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Uladzislau Rezki <urezki@gmail.com>,
Sasha Levin <sashal@kernel.org>,
dave@stgolabs.net, josh@joshtriplett.org, frederic@kernel.org,
neeraj.upadhyay@kernel.org, joel@joelfernandes.org,
boqun.feng@gmail.com, rcu@vger.kernel.org
Subject: [PATCH AUTOSEL 6.8 07/14] rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment
Date: Sun, 26 May 2024 05:42:12 -0400 [thread overview]
Message-ID: <20240526094224.3412675-7-sashal@kernel.org> (raw)
In-Reply-To: <20240526094224.3412675-1-sashal@kernel.org>
From: "Paul E. McKenney" <paulmck@kernel.org>
[ 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>
---
kernel/rcu/rcutorture.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 7567ca8e743ca..ade96c85b12ab 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1993,7 +1993,8 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp, long myid)
preempt_disable();
pipe_count = READ_ONCE(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();
--
2.43.0
next prev parent reply other threads:[~2024-05-26 9:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-26 9:42 [PATCH AUTOSEL 6.8 01/14] fs/writeback: bail out if there is no more inodes for IO and queued once Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 02/14] md: Fix overflow in is_mddev_idle Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 03/14] padata: Disable BH when taking works lock on MT path Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 04/14] crypto: hisilicon/sec - Fix memory leak for sec resource release Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 05/14] crypto: hisilicon/qm - Add the err memory release process to qm uninit Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 06/14] io_uring/sqpoll: work around a potential audit memory leak Sasha Levin
2024-05-26 9:42 ` Sasha Levin [this message]
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 08/14] rcutorture: Make stall-tasks directly exit when rcutorture tests end Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 09/14] rcutorture: Fix invalid context warning when enable srcu barrier testing Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 10/14] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 11/14] platform/chrome: cros_usbpd_notify: " Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 12/14] binfmt_elf: Leave a gap between .bss and brk Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 13/14] arm64: defconfig: select INTERCONNECT_QCOM_SM6115 as built-in Sasha Levin
2024-05-26 9:42 ` [PATCH AUTOSEL 6.8 14/14] block/ioctl: prefer different overflow check Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240526094224.3412675-7-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=dave@stgolabs.net \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraj.upadhyay@kernel.org \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=urezki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox