From: Steven Rostedt <rostedt@goodmis.org>
To: Al Viro <viro@ZenIV.linux.org.uk>, Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: tracing: don't stuff stale pointers in filp->private_data
Date: Sat, 21 Sep 2013 11:37:30 -0400 [thread overview]
Message-ID: <cd5db43e-160e-448a-9708-3c5e44c0d34c@email.android.com> (raw)
In-Reply-To: <20130921143255.GS13318@ZenIV.linux.org.uk>
Or make the assignment in an else block.
-- Steve
Al Viro <viro@ZenIV.linux.org.uk> wrote:
>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?
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
next prev parent reply other threads:[~2013-09-21 15:46 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
2013-09-21 15:37 ` Steven Rostedt [this message]
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=cd5db43e-160e-448a-9708-3c5e44c0d34c@email.android.com \
--to=rostedt@goodmis.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®