diff options
-rw-r--r-- | kernel/trace/trace.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 8755a4370484..6580e7ed04be 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -289,6 +289,13 @@ int register_tracer(struct tracer *type) | |||
289 | printk(KERN_CONT "FAILED!\n"); | 289 | printk(KERN_CONT "FAILED!\n"); |
290 | goto out; | 290 | goto out; |
291 | } | 291 | } |
292 | /* Only reset on passing, to avoid touching corrupted buffers */ | ||
293 | for_each_possible_cpu(i) { | ||
294 | data = tr->data[i]; | ||
295 | if (!head_page(data)) | ||
296 | continue; | ||
297 | tracing_reset(data); | ||
298 | } | ||
292 | printk(KERN_CONT "PASSED\n"); | 299 | printk(KERN_CONT "PASSED\n"); |
293 | } | 300 | } |
294 | #endif | 301 | #endif |