From: Steven Rostedt <rostedt@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Carlier <devnexen@gmail.com>
Subject: [for-next][PATCH 2/3] tracing: Report every TP_printk double dereference
Date: Tue, 11 Aug 2026 15:31:02 -0400 [thread overview]
Message-ID: <20260811193126.703949368@kernel.org> (raw)
In-Reply-To: 20260811193100.764585233@kernel.org
From: David Carlier <devnexen@gmail.com>
WARN_ONCE() splats once per call site, so only the first offending event
registered is ever reported. The tree currently has six:
ice_{rx,tx}_dim_template, two hfi1 txq events, mtu3_ep and edma_log_io.
Whichever registers first hides the rest, and each has to be found again
on the next boot.
Add a pr_warn() next to the WARN_ONCE() so every offender is listed, the
same way test_event_printk() already pairs WARN_ON_ONCE() with pr_warn()
for unsafe %p* dereferences. The WARN_ONCE() stays so the condition still
fails tests and panics under panic_on_warn.
Link: https://patch.msgid.link/20260806215256.1680267-1-devnexen@gmail.com
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_events.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index a8590d2394e3..ce902482ec7c 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -415,6 +415,8 @@ static void test_double_dereference(const char *str, int len,
ptr += 5;
for (; ptr < end; ptr++) {
if (ptr[0] == '-' && ptr[1] == '>') {
+ pr_warn("TRACE EVENT ERROR: Event %s has double dereference in TP_printk: %.*s\n",
+ trace_event_name(call), len, str);
WARN_ONCE(1, "Event %s has double dereference in TP_printk: %.*s\n",
trace_event_name(call), len, str);
return;
--
2.53.0
next prev parent reply other threads:[~2026-08-11 19:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 19:31 [for-next][PATCH 0/3] tracing: Updates for v7.3 Steven Rostedt
2026-08-11 19:31 ` [for-next][PATCH 1/3] tracing/mmiotrace: Use trace_assign_type() in mmio_print_mark() Steven Rostedt
2026-08-11 19:31 ` Steven Rostedt [this message]
2026-08-11 19:31 ` [for-next][PATCH 3/3] tracing: Cleanup event_enable_trigger_parse() by using __free() Steven Rostedt
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=20260811193126.703949368@kernel.org \
--to=rostedt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=devnexen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.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