From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
rostedt@goodmis.org, "Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH v4 1/6] rcutorture: Add context checks to rcu_torture_timer()
Date: Mon, 29 Dec 2025 11:13:53 -0800 [thread overview]
Message-ID: <20251229191358.693753-1-paulmck@kernel.org> (raw)
In-Reply-To: <eb69cddd-2e89-43a5-ba61-95af1d820dc0@paulmck-laptop>
This commit adds irq, NMI, and softirq context checks to the
rcu_torture_timer() function. Just because you are paranoid does not
mean that they are not out to get you... ;-)
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
kernel/rcu/rcutorture.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index d00b043823aef..63053031ade21 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2454,6 +2454,9 @@ static DEFINE_TORTURE_RANDOM_PERCPU(rcu_torture_timer_rand);
*/
static void rcu_torture_timer(struct timer_list *unused)
{
+ WARN_ON_ONCE(!in_serving_softirq());
+ WARN_ON_ONCE(in_hardirq());
+ WARN_ON_ONCE(in_nmi());
atomic_long_inc(&n_rcu_torture_timers);
(void)rcu_torture_one_read(this_cpu_ptr(&rcu_torture_timer_rand), -1);
--
2.40.1
next prev parent reply other threads:[~2025-12-29 19:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-29 19:13 [PATCH 0/6] Torture-test updates for post-v4.19 Paul E. McKenney
2025-12-29 19:13 ` Paul E. McKenney [this message]
2025-12-29 19:13 ` [PATCH v4 2/6] torture: Parallelize kvm-series.sh guest-OS execution Paul E. McKenney
2025-12-29 19:13 ` [PATCH v4 3/6] torture: Make kvm-series.sh give build numbers and totals Paul E. McKenney
2025-12-29 19:13 ` [PATCH v4 4/6] torture: Make kvm-series.sh give run " Paul E. McKenney
2025-12-29 19:13 ` [PATCH v4 5/6] torture: Make config2csv.sh properly handle comments in .boot files Paul E. McKenney
2025-12-29 19:13 ` [PATCH v4 6/6] torture: Include commit discription in testid.txt Paul E. McKenney
2026-01-01 8:46 ` [PATCH 0/6] Torture-test updates for post-v4.19 Boqun Feng
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=20251229191358.693753-1-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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
all inboxes | Powered by JetHome®