[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250728110723.caf5846854d578e98db2c375@kernel.org>
Date: Mon, 28 Jul 2025 11:07:23 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/7] tracing: probe: Allocate
traceprobe_parse_context from heap
On Wed, 23 Jul 2025 10:30:56 +0900
"Masami Hiramatsu (Google)" <mhiramat@...nel.org> wrote:
> diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c
> index add08ffb04d7..610f8d53be8a 100644
> --- a/kernel/trace/trace_fprobe.c
> +++ b/kernel/trace/trace_fprobe.c
> @@ -1384,14 +1384,17 @@ static int trace_fprobe_create_internal(int argc, const char *argv[],
>
> static int trace_fprobe_create_cb(int argc, const char *argv[])
> {
> - struct traceprobe_parse_context ctx = {
> - .flags = TPARG_FL_KERNEL | TPARG_FL_FPROBE,
> - };
> + struct traceprobe_parse_context *ctx __free(traceprobe_parse_context) = NULL;
> int ret;
>
> + ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
> + if (!ctx)
> + return -ENOMEM;
> +
> + ctx->flags = TPARG_FL_KERNEL | TPARG_FL_FPROBE,
Oops, this last should be ';' instead of ','!
--
Masami Hiramatsu (Google) <mhiramat@...nel.org>
Powered by blists - more mailing lists