lttng-modules v0.19-stable: setup_trace_write: Fix recursive locking
[lttng-modules.git] / ltt-tracer.c
index 8eae966e386bb6e6f8cb9a09e5b291bb0d341e5d..1ca5ba2b5f7c4e04132eb40f47f4d9191bcb6079 100644 (file)
@@ -782,7 +782,9 @@ int ltt_trace_alloc(const char *trace_name)
        kref_init(&trace->kref);
        init_waitqueue_head(&trace->kref_wq);
        trace->active = 0;
-       get_trace_clock();
+       err = get_trace_clock();
+       if (err)
+               goto traces_error;
        trace->freq_scale = trace_clock_freq_scale();
 
        if (!trace->transport) {
@@ -1029,7 +1031,9 @@ void ltt_channels_trace_start_timer(struct ltt_chan *channels,
 
        for (i = 0; i < nr_channels; i++) {
                struct ltt_chan *chan = &channels[i];
-               chan->a.trace->ops->start_switch_timer(chan);
+
+               if (chan->active)
+                       chan->a.trace->ops->start_switch_timer(chan);
        }
 }
 
@@ -1044,7 +1048,9 @@ void ltt_channels_trace_stop_timer(struct ltt_chan *channels,
 
        for (i = 0; i < nr_channels; i++) {
                struct ltt_chan *chan = &channels[i];
-               chan->a.trace->ops->stop_switch_timer(chan);
+
+               if (chan->active)
+                       chan->a.trace->ops->stop_switch_timer(chan);
        }
 }
 
This page took 0.024608 seconds and 4 git commands to generate.