mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] tracing: uprobe-event: Allocate string buffers from heap
Date: Sat, 19 Jul 2025 10:13:15 +0900	[thread overview]
Message-ID: <20250719101315.6bb5b44b76353bc324fa5dc6@kernel.org> (raw)
In-Reply-To: <20250718135846.6dd841e7@batman.local.home>

On Fri, 18 Jul 2025 13:58:46 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> > +		buf = kmalloc(MAX_EVENT_NAME_LEN, GFP_KERNEL);
> > +		if (!buf) {
> > +			ret = -ENOMEM;
> > +			goto fail_address_parse;
> > +		}
> >  		snprintf(buf, MAX_EVENT_NAME_LEN, "%c_%s_0x%lx", 'p', tail, offset);
> >  		event = buf;
> >  		kfree(tail);
> 
> You could easily do the same thing as I mentioned in my reply to patch 4:
> 
> 		if (!buf)
> 			goto fail_mem;
> 
> error:
> 	free_trace_uprobe(tu);
> out:
> 	trace_probe_log_clear();
> 	return ret;
> 
> fail_mem:
> 	ret = -ENOMEM;
> fail_address_parse:
> 	trace_probe_log_clear();
> 	path_put(&path);
> 	kfree(filename);
> 
> 	return ret;
> }

OK, let me update it. Thanks!

> 
> -- Steve


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

      reply	other threads:[~2025-07-19  1:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-18 11:33 [PATCH 0/5] tracing: probes: Use heap instead of stack for temporary buffers Masami Hiramatsu (Google)
2025-07-18 11:34 ` [PATCH 1/5] tracing: probe: Allocate traceprobe_parse_context from heap Masami Hiramatsu (Google)
2025-07-18 16:58   ` Steven Rostedt
2025-07-19  0:33     ` Masami Hiramatsu
2025-07-18 11:34 ` [PATCH 2/5] tracing: fprobe-event: Allocate string buffers " Masami Hiramatsu (Google)
2025-07-18 17:39   ` Steven Rostedt
2025-07-19  0:57     ` Masami Hiramatsu
2025-07-19  4:35       ` Masami Hiramatsu
2025-07-18 11:34 ` [PATCH 3/5] tracing: kprobe-event: " Masami Hiramatsu (Google)
2025-07-18 17:46   ` Steven Rostedt
2025-07-19  1:17     ` Masami Hiramatsu
2025-07-18 11:34 ` [PATCH 4/5] tracing: eprobe-event: " Masami Hiramatsu (Google)
2025-07-18 17:55   ` Steven Rostedt
2025-07-19  1:11     ` Masami Hiramatsu
2025-07-18 11:34 ` [PATCH 5/5] tracing: uprobe-event: " Masami Hiramatsu (Google)
2025-07-18 17:58   ` Steven Rostedt
2025-07-19  1:13     ` 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=20250719101315.6bb5b44b76353bc324fa5dc6@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.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

all inboxes | Powered by JetHome®