From: Ingo Molnar on

* Steven Rostedt <rostedt(a)goodmis.org> wrote:

> Ingo,
>
> I found that reading the trace file and the raw_trace_pipe using splice, at
> the same time could cause a kernel oops. Not a major one, that is, the oops
> only crashes the user task that is performing the read of the trace file.
> But still urgent enough to go into 2.6.33.
>
> The issue is with the iterator that is stored to access multiple reads of
> the ring buffer without consuming the data. If a user process starts reading
> the contents of the ring buffer with the iterator, and in the mean time a
> consuming read is done, then the iterator can become stale and return a
> bogus entry.
>
> The first patch fixes the pid to cmdline mapping function to not crash when
> given a negative pid (which happened when we had a bogus entry).
>
> The next two patches fix the ring buffer to detect when a consuming
> read is done and to reset the iterator.
>
> Since I'm pushing these patches up, I've also incuded two
> documentation changes. One of the patches touches a Kconfig file
> but only the help portion of it.
>
> Please pull the latest tip/tracing/urgent tree, which can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/urgent
>
>
> Mike Frysinger (1):
> tracing/documentation: Cover new frame pointer semantics
>
> Steven Rostedt (3):
> tracing: Prevent kernel oops with corrupted buffer
> ring-buffer: Check if ring buffer iterator has stale data
> ring-buffer: Check for end of page in iterator
>
> Yang Hongyang (1):
> tracing/documentation: Fix a typo in ftrace.txt
>
> ----
> Documentation/trace/ftrace-design.txt | 26 +++++++++++++++++++++++---
> Documentation/trace/ftrace.txt | 2 +-
> kernel/trace/Kconfig | 4 +---
> kernel/trace/ring_buffer.c | 24 +++++++++++++++++++++---
> kernel/trace/trace.c | 5 +++++
> 5 files changed, 51 insertions(+), 10 deletions(-)

Pulled, thanks a lot Steve!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/