From: Steven Rostedt <rostedt@goodmis.org>
To: Yu Peng <pengyu@kylinos.cn>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Tom Zanussi <zanussi@kernel.org>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
Rosen Penev <rosenp@gmail.com>
Subject: Re: [PATCH] tracing: Fix field_var_str allocation errno
Date: Fri, 29 May 2026 11:25:58 -0400 [thread overview]
Message-ID: <20260529112558.63e650d5@fedora> (raw)
In-Reply-To: <20260526095022.1330107-1-pengyu@kylinos.cn>
On Tue, 26 May 2026 17:50:22 +0800
Yu Peng <pengyu@kylinos.cn> wrote:
> hist_trigger_elt_data_alloc() returns -EINVAL when the field_var_str
> kcalloc() fails. Return -ENOMEM instead, matching the other allocation
> failures in the function.
>
> Fixes: c910db943d35 ("tracing: Dynamically allocate the per-elt hist_elt_data array")
> Signed-off-by: Yu Peng <pengyu@kylinos.cn>
> ---
> kernel/trace/trace_events_hist.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index eb2c2bc8bc3d..17fe13e12a4f 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -1680,7 +1680,7 @@ static int hist_trigger_elt_data_alloc(struct tracing_map_elt *elt)
> elt_data->field_var_str = kcalloc(n_str, sizeof(char *), GFP_KERNEL);
> if (!elt_data->field_var_str) {
> hist_elt_data_free(elt_data);
> - return -EINVAL;
> + return -ENOMEM;
> }
> elt_data->n_field_var_str = n_str;
>
Thanks but this code is made obsolete by this patch that I'm pulling in:
https://lore.kernel.org/all/20260522214407.18120-1-rosenp@gmail.com/
-- Steve
prev parent reply other threads:[~2026-05-29 15:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 9:50 [PATCH] tracing: Fix field_var_str allocation errno Yu Peng
2026-05-27 1:04 ` Masami Hiramatsu
2026-05-29 15:25 ` Steven Rostedt [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=20260529112558.63e650d5@fedora \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=pengyu@kylinos.cn \
--cc=rosenp@gmail.com \
--cc=zanussi@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