From: Frederic Weisbecker <fweisbec@gmail.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [QUESTION] trace_function_graph: consumed event may be invalid
Date: Tue, 30 Jun 2009 12:54:18 +0200 [thread overview]
Message-ID: <20090630105416.GA5249@nowhere> (raw)
In-Reply-To: <4A49C96C.6070305@cn.fujitsu.com>
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.
prev parent reply other threads:[~2009-06-30 10:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-30 8:14 [QUESTION] trace_function_graph: consumed event may be invalid Lai Jiangshan
2009-06-30 10:54 ` Frederic Weisbecker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090630105416.GA5249@nowhere \
--to=fweisbec@gmail.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox