From: Al Viro <viro@ZenIV.linux.org.uk>
To: Dave Jones <davej@redhat.com>,
rostedt@goodmis.org, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: tracing: don't stuff stale pointers in filp->private_data
Date: Sat, 21 Sep 2013 15:32:55 +0100 [thread overview]
Message-ID: <20130921143255.GS13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20130920164732.GA31520@redhat.com>
On Fri, Sep 20, 2013 at 12:47:32PM -0400, Dave Jones wrote:
> Probably harmless, but still not a nice thing to do.
>
> Signed-off-by: Dave Jones <davej@fedoraproject.org>
>
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 368a4d5..75d3556 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -1124,6 +1124,7 @@ static int system_tr_open(struct inode *inode, struct file *filp)
> if (ret < 0) {
> trace_array_put(tr);
> kfree(dir);
> + dir = NULL;
> }
>
> filp->private_data = dir;
Er... Why not simply return ret; instead?
next prev parent reply other threads:[~2013-09-21 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 16:47 Dave Jones
2013-09-21 14:32 ` Al Viro [this message]
2013-09-21 15:37 ` Steven Rostedt
2013-09-25 22:49 ` Dave Jones
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=20130921143255.GS13318@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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
Powered by JetHome