[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B84E2B7.1070901@cn.fujitsu.com>
Date: Wed, 24 Feb 2010 16:26:31 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: wenji.huang@...cle.com
CC: linux-kernel@...r.kernel.org, fweisbec@...il.com,
rostedt@...dmis.org
Subject: Re: [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field
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(). ;)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists