From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: martin@kaiser.cx
Cc: Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Markus Schneider-Pargmann <msp@baylibre.com>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: Re: [PATCH] tracing: probes: remove unused variable
Date: Tue, 13 Oct 2026 09:17:07 +0000 [thread overview]
Message-ID: <20261013091708.CE8CD1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260502135826.146257-1-martin@kaiser.cx>
Hi,
On Sat, 02 May 2026 15:57:42 +0200, Martin Kaiser <martin@kaiser.cx> wrote:
> diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
> --- a/kernel/trace/trace_probe.c
> +++ b/kernel/trace/trace_probe.c
> @@ -1747,7 +1746,7 @@ const char **traceprobe_expand_meta_args(int argc, const char *argv[],
> if (args_idx != -1) {
> /* $arg* requires BTF info */
> trace_probe_log_err(0, NOSUP_BTFARG);
> + return NULL;
Returning NULL here causes traceprobe_expand_meta_args() to treat this as
success (no expansion needed), leaving *new_argc uninitialized and passing
the unexpanded "$arg*" to subsequent argument parsing (which later fails
with a confusing error).
We should return an error here rather than NULL.
Specifically, returning ERR_PTR(-EOPNOTSUPP) is the right fix, which also
eliminates the need for the params variable.
This is a bug, introduced by commit d157d7694460 ("tracing/probes: Support
BTF field access from $retval").
Can you update to fix this bug?
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2026-10-13 9:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 13:57 [PATCH] tracing: probes: remove unused variable Martin Kaiser
2026-05-04 8:59 ` Markus Schneider-Pargmann
2026-10-13 9:17 ` Masami Hiramatsu [this message]
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=20261013091708.CE8CD1F000FF@smtp.kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin@kaiser.cx \
--cc=msp@baylibre.com \
--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