[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260129193359.08230ac0@gandalf.local.home>
Date: Thu, 29 Jan 2026 19:33:59 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
bpf@...r.kernel.org, Masami Hiramatsu <mhiramat@...nel.org>, Mark Rutland
<mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>, Sebastian Andrzej Siewior
<bigeasy@...utronix.de>, Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH v6 0/3] tracing: Guard __DECLARE_TRACE() use of
__DO_TRACE_CALL() with SRCU-fast
On Tue, 27 Jan 2026 15:18:05 -0800
"Paul E. McKenney" <paulmck@...nel.org> wrote:
> Ah, I get it. I think. NMIs, right?
>
> In your source tree, line 792 of kernel/rcu/srcutree.c is this line of
> code, correct?
>
> WARN_ON_ONCE((read_flavor != SRCU_READ_FLAVOR_NMI) && in_nmi());
>
> If so, could you please try this test with the patch shown at the end
> of this email?
>
>
> diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
> index c469c708fdd6a..66ba6a2f83d3a 100644
> --- a/kernel/rcu/srcutree.c
> +++ b/kernel/rcu/srcutree.c
> @@ -789,7 +789,8 @@ void __srcu_check_read_flavor(struct srcu_struct *ssp, int read_flavor)
> struct srcu_data *sdp;
>
> /* NMI-unsafe use in NMI is a bad sign, as is multi-bit read_flavor values. */
> - WARN_ON_ONCE((read_flavor != SRCU_READ_FLAVOR_NMI) && in_nmi());
> + WARN_ON_ONCE(read_flavor != SRCU_READ_FLAVOR_NMI &&
> + read_flavor != SRCU_READ_FLAVOR_FAST && in_nmi());
> WARN_ON_ONCE(read_flavor & (read_flavor - 1));
>
> sdp = raw_cpu_ptr(ssp->sda);
It appears to fix the issue.
Tested-by: Steven Rostedt (Google) <rostedt@...dmis.org>
Care to send a formal patch, and I'll add it before the patch that causes
issues.
Thanks,
-- Steve
Powered by blists - more mailing lists