Fix: Missing RCU read lock in kernel_destroy_session()
[lttng-tools.git] / src / bin / lttng-sessiond / kernel.c
index 44a71fc595de1427682bf84b19991bf0725da1bd..7a1b7a98b3ce0d5451ad9d901a64142772d4d9d7 100644 (file)
@@ -772,6 +772,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;
@@ -785,6 +786,7 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess)
                                }
                        }
                }
+               rcu_read_unlock();
        }
 
        /* Close any relayd session */
This page took 0.023628 seconds and 4 git commands to generate.