[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A9C6FEB.40202@cn.fujitsu.com>
Date: Tue, 01 Sep 2009 08:50:51 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Frederic Weisbecker <fweisbec@...il.com>
CC: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
Tom Zanussi <tzanussi@...il.com>,
Masami Hiramatsu <mhiramat@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing/filters: Defer pred allocation
>> @@ -1094,6 +1118,10 @@ int apply_event_filter(struct ftrace_event_call *call, char *filter_string)
>>
>> mutex_lock(&event_mutex);
>>
>> + err = init_preds(call);
>> + if (err)
>> + goto out_unlock;
>
>
>
> Hmm, but what happens if the filter already has its preds initialized
> by a previous filter?
>
> The first thing that init_preds() does is:
>
> filter = call->filter = kzalloc(sizeof(*filter), GFP_KERNEL);
>
> That looks like a memory leak.
>
Oops! I thought I had added a check in it.
Thanks.
--
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