lkml.org 
[lkml]   [2009]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2009-06-30 12:57    [W:0.059 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site