[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090630105416.GA5249@nowhere>
Date: Tue, 30 Jun 2009 12:54:18 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [QUESTION] trace_function_graph: consumed event may be invalid
On Tue, Jun 30, 2009 at 04:14:36PM +0800, Lai Jiangshan wrote:
>
> In get_return_for_leaf() {
> ......
> ring_buffer_consume()
> ......
> access to @curr->ent.pid
> }
>
> @curr is saved at consumed event, if this event is the last event
> in the page, the ring_buffer may reuse the page. It will become invalid.
Indeed!
> Is there any other code to ensure it valid when we `cat trace_pipe`?
>
> Lai.
The only solution I see is to do a copy of the entry before consuming it.
I'll try that, thanks for your report!
Frederic.
--
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