aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 1bbfa0446507..f3ec1cfb0de1 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4817,10 +4817,17 @@ rb_simple_write(struct file *filp, const char __user *ubuf,
4817 return ret; 4817 return ret;
4818 4818
4819 if (buffer) { 4819 if (buffer) {
4820 if (val) 4820 mutex_lock(&trace_types_lock);
4821 if (val) {
4821 ring_buffer_record_on(buffer); 4822 ring_buffer_record_on(buffer);
4822 else 4823 if (current_trace->start)
4824 current_trace->start(tr);
4825 } else {
4823 ring_buffer_record_off(buffer); 4826 ring_buffer_record_off(buffer);
4827 if (current_trace->stop)
4828 current_trace->stop(tr);
4829 }
4830 mutex_unlock(&trace_types_lock);
4824 } 4831 }
4825 4832
4826 (*ppos)++; 4833 (*ppos)++;