From: Steven Rostedt <rostedt@goodmis.org>
To: Zheng Yejian <zhengyejian1@huawei.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 2/2] tracing: Add free_trace_iter_content() helper function
Date: Sat, 15 Jul 2023 09:42:01 -0400 [thread overview]
Message-ID: <20230715094201.34a41f17@rorschach.local.home> (raw)
In-Reply-To: <d8aeab6c-338e-dcdd-75c6-7ae4eb9c9887@huawei.com>
On Sat, 15 Jul 2023 13:15:32 +0800
Zheng Yejian <zhengyejian1@huawei.com> wrote:
> > @@ -6709,7 +6723,12 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)
> > }
> >
> > trace_seq_init(&iter->seq);
> > - iter->trace = tr->current_trace;
> > +
> > + iter->trace = kzalloc(sizeof(*iter->trace), GFP_KERNEL);
> > + if (!iter->trace)
> > + goto fail;
>
> Hi, Steve, 'ret' may need to be set before `goto fail`:
> ret = -ENOMEM;
>
As I mentioned to Masami, this hunk of the patch didn't belong.
Something got mixed up in the commit. This patch even depends on the
previous patch to remove the allocation completely.
-- Steve
next prev parent reply other threads:[~2023-07-15 13:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 15:45 [PATCH 0/2] tracing: Clean up how iter is freed Steven Rostedt
2023-07-13 15:46 ` [PATCH 1/2] tracing: Remove unnecessary copying of tr->current_trace Steven Rostedt
2023-07-14 8:38 ` Masami Hiramatsu
2023-07-13 15:47 ` [PATCH 2/2] tracing: Add free_trace_iter_content() helper function Steven Rostedt
2023-07-14 8:47 ` Masami Hiramatsu
2023-07-14 14:22 ` Steven Rostedt
2023-07-15 5:15 ` Zheng Yejian
2023-07-15 13:42 ` Steven Rostedt [this message]
2023-07-15 13:54 ` 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=20230715094201.34a41f17@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=zhengyejian1@huawei.com \
/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
Powered by JetHome