diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 03fbd4c20bc2..93040f1bef13 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -559,6 +559,15 @@ void unregister_tracer(struct tracer *type) | |||
559 | 559 | ||
560 | found: | 560 | found: |
561 | *t = (*t)->next; | 561 | *t = (*t)->next; |
562 | |||
563 | if (type == current_trace && tracer_enabled) { | ||
564 | tracer_enabled = 0; | ||
565 | tracing_stop(); | ||
566 | if (current_trace->stop) | ||
567 | current_trace->stop(&global_trace); | ||
568 | current_trace = &nop_trace; | ||
569 | } | ||
570 | |||
562 | if (strlen(type->name) != max_tracer_type_len) | 571 | if (strlen(type->name) != max_tracer_type_len) |
563 | goto out; | 572 | goto out; |
564 | 573 | ||