]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - kernel/trace/ring_buffer.c
ring-buffer: Reset head page before running self test
authorSteven Rostedt <srostedt@redhat.com>
Wed, 16 May 2012 23:46:32 +0000 (19:46 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 16 May 2012 23:50:36 +0000 (19:50 -0400)
commit308f7eeb7882c27c1d7aa783499cb22f3b199718
treef04fb171bae7d2b2f1a7566bd747724a4973014f
parent659f451ff21315ebfeeb46b9adccee8ce1b52c25
ring-buffer: Reset head page before running self test

When the ring buffer does its consistency test on itself, it
removes the head page, runs the tests, and then adds it back
to what the "head_page" pointer was. But because the head_page
pointer may lack behind the real head page (held by the link
list pointer). The reset may be incorrect.

Instead, if the head_page exists (it does not on first allocation)
reset it back to the real head page before running the consistency
tests. Then it will be put back to its original location after
the tests are complete.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c