tracing: disable buffers and synchronize_sched before resetting
authorSteven Rostedt <srostedt@redhat.com>
Fri, 4 Sep 2009 16:02:35 +0000 (12:02 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 4 Sep 2009 16:02:35 +0000 (12:02 -0400)
commit621968cdb2563b667d6ecb484ba91ef4c3a797b3
treea4b8e3ba1f55d6b725b37a4e42c2f376d6150cdc
parentb8de7bd168fa54d059b16d3057b2f8a32cc5bdc3
tracing: disable buffers and synchronize_sched before resetting

Resetting the ring buffers while traces are happening can corrupt
the ring buffer and disable it (no kernel crash to worry about).

The safest thing to do is disable the ring buffers, call synchronize_sched()
to wait for all current writers to finish and then reset the buffer.

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