From: Dave Jones <davej@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: tracing: don't stuff stale pointers in filp->private_data
Date: Wed, 25 Sep 2013 18:49:13 -0400 [thread overview]
Message-ID: <20130925224912.GA23473@redhat.com> (raw)
In-Reply-To: <cd5db43e-160e-448a-9708-3c5e44c0d34c@email.android.com>
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..27aa16e 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1124,10 +1124,10 @@ static int system_tr_open(struct inode *inode, struct file *filp)
if (ret < 0) {
trace_array_put(tr);
kfree(dir);
+ } else {
+ filp->private_data = dir;
}
- filp->private_data = dir;
-
return ret;
}
prev parent reply other threads:[~2013-09-25 22:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 16:47 tracing: don't stuff stale pointers in filp->private_data Dave Jones
2013-09-21 14:32 ` Al Viro
2013-09-21 15:37 ` Steven Rostedt
2013-09-25 22:49 ` Dave Jones [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=20130925224912.GA23473@redhat.com \
--to=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=viro@ZenIV.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).