Fix: add missing rcu_barrier before daemon teardown
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 85a35183fba5acc00a4cd80e755005c204396339..40670ddd52a5c150053e0ae0fe60ca6f1b252184 100644 (file)
@@ -6147,6 +6147,12 @@ exit_client:
 exit_health:
 
 exit_init_data:
+       /*
+        * Wait for all pending call_rcu work to complete before tearing
+        * down data structures. call_rcu worker may be trying to
+        * perform lookups in those structures.
+        */
+       rcu_barrier();
        /*
         * sessiond_cleanup() is called when no other thread is running, except
         * the ht_cleanup thread, which is needed to destroy the hash tables.
This page took 0.022903 seconds and 4 git commands to generate.