[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0903021252420.4771@gandalf.stny.rr.com>
Date: Mon, 2 Mar 2009 12:53:24 -0500 (EST)
From: Steven Rostedt <rostedt@...dmis.org>
To: Frédéric Weisbecker <fweisbec@...il.com>
cc: Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Lai Jiangshan <laijs@...fujitsu.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] ftrace: add ftrace_bprintk()
On Mon, 2 Mar 2009, Fr?d?ric Weisbecker wrote:
> >> +
> >> +static
> >> +void release_module_trace_bprintk_format(const char **start, const char **end)
> >> +{
> >> + const char **iter;
> >> + lock_btrace();
> >> + for (iter = start; iter < end; iter++) {
> >> + struct trace_bprintk_fmt *tb_fmt;
> >> + if (!*iter)
> >> + continue;
> >> +
> >> + tb_fmt = container_of(*iter, struct trace_bprintk_fmt, fmt[0]);
> >> + tb_fmt->count--;
> >> + if (!tb_fmt->count && !btrace_metadata_count) {
> >> + list_del(&tb_fmt->list);
> >> + kfree(tb_fmt);
> >
> > Shouldn't *iter get assigned to NULL somewhere here?
> >
> > -- Steve
>
>
> Hm, why?
Well, after we free tb_fmt, the *iter will then point to garbage. Right?
-- Steve
Powered by blists - more mailing lists