Fix: Missing RCU read lock in kernel_destroy_session()
[lttng-tools.git] / src / bin / lttng-sessiond / kernel.c
index a9151f4d6ffae2a4b56f7ea652b4058b408a37b5..65c470e0935499960bdf9901fa7b479e18e5da68 100644 (file)
@@ -793,6 +793,7 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess)
                struct lttng_ht_iter iter;
 
                /* For each consumer socket. */
+               rcu_read_lock();
                cds_lfht_for_each_entry(ksess->consumer->socks->ht, &iter.iter,
                                socket, node.node) {
                        struct ltt_kernel_channel *chan;
@@ -806,6 +807,7 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess)
                                }
                        }
                }
+               rcu_read_unlock();
        }
 
        /* Close any relayd session */
This page took 0.024753 seconds and 4 git commands to generate.