From: Li Zefan <lizf@cn.fujitsu.com>
To: wenji.huang@oracle.com
Cc: linux-kernel@vger.kernel.org, fweisbec@gmail.com, rostedt@goodmis.org
Subject: Re: [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field
Date: Wed, 24 Feb 2010 16:26:31 +0800 [thread overview]
Message-ID: <4B84E2B7.1070901@cn.fujitsu.com> (raw)
In-Reply-To: <4B84E173.9010608@oracle.com>
Wenji Huang wrote:
> On 02/24/2010 04:04 PM, Li Zefan wrote:
>> Wenji Huang wrote:
>>> Discard freeing field->type since it's not necessary and may be hazard.
>>>
>>
>> It's redundant, but it's safe, because if we run into this failure path,
>> field->type is always NULL.
>
> There are two entries to failure path, field->name == NULL or
> field->type == NULL. And allocating for field->name is before field->type.
>
> IMHO, field->type is not fixed after initialization, it's
> not safe if field->name==NULL goes to failure path.
>
It's still safe, because field is allocated using kzalloc(). ;)
next prev parent reply other threads:[~2010-02-24 8:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 7:40 [PATCH -tip 1/5] tracing: fix typo in prof_sysexit_enable() Wenji Huang
2010-02-24 7:40 ` [PATCH -tip 2/5] tracing: fix typo of info text in trace_kprobe.c Wenji Huang
2010-02-24 7:40 ` [PATCH -tip 3/5] tracing: remove unnecessary variable in print_graph_return Wenji Huang
2010-02-24 7:40 ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Wenji Huang
2010-02-24 7:40 ` [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field Wenji Huang
2010-02-24 8:04 ` Li Zefan
2010-02-24 8:21 ` Wenji Huang
2010-02-24 8:26 ` Li Zefan [this message]
2010-02-26 9:29 ` [tip:tracing/core] tracing: Simplify " tip-bot for Wenji Huang
2010-02-25 4:18 ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Frederic Weisbecker
2010-02-25 15:35 ` Steven Rostedt
2010-02-26 9:28 ` [tip:tracing/core] tracing: Remove unnecessary variable in print_graph_return tip-bot for Wenji Huang
2010-02-26 9:28 ` [tip:tracing/core] tracing: Fix typo of info text in trace_kprobe.c tip-bot for Wenji Huang
2010-02-26 9:28 ` [tip:tracing/core] tracing: Fix typo in prof_sysexit_enable() tip-bot for Wenji Huang
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=4B84E2B7.1070901@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=wenji.huang@oracle.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