Fix: RCU read side lock unbalanced
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index bcf349f9290476de0268dce0e9a535e331d6dedc..d8571aa02e8b8317df04f283ef315bc75c1c1d68 100644 (file)
@@ -857,6 +857,8 @@ int cmd_enable_channel(struct ltt_session *session,
 
        DBG("Enabling channel %s for session %s", attr->name, session->name);
 
+       rcu_read_lock();
+
        /*
         * Don't try to enable a channel if the session has been started at
         * some point in time before. The tracer does not allow it.
@@ -866,8 +868,6 @@ int cmd_enable_channel(struct ltt_session *session,
                goto error;
        }
 
-       rcu_read_lock();
-
        switch (domain->type) {
        case LTTNG_DOMAIN_KERNEL:
        {
This page took 0.027458 seconds and 4 git commands to generate.