Fix: Perform rcu barrier before tearing down the run-as worker
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Sep 2015 20:16:35 +0000 (16:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Sep 2015 20:16:35 +0000 (16:16 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-consumerd/lttng-consumerd.c
src/bin/lttng-sessiond/main.c
src/common/consumer.c

index 7ecbe7a3439a9f148719289a703da8014968357a..a56f02d1b1ccc264a4178b534ed189e377a45bae 100644 (file)
@@ -642,13 +642,14 @@ exit_init_data:
        if (health_consumerd) {
                health_app_destroy(health_consumerd);
        }
-exit_health_consumerd_cleanup:
+       /* Ensure all prior call_rcu are done. */
+       rcu_barrier();
 
-exit_options:
+       run_as_destroy_worker();
 
+exit_health_consumerd_cleanup:
+exit_options:
 exit_set_signal_handler:
-       /* Ensure all prior call_rcu are done. */
-       rcu_barrier();
 
        if (!retval) {
                exit(EXIT_SUCCESS);
index 5d098d7689a10e8b80417e92ea2da7efd85f5eb2..9d5a668e5c5446983583f83907102a766db6f73c 100644 (file)
@@ -6136,11 +6136,12 @@ exit_health_sessiond_cleanup:
 exit_create_run_as_worker_cleanup:
 
 exit_options:
+       /* Ensure all prior call_rcu are done. */
+       rcu_barrier();
+
        sessiond_cleanup_options();
 
 exit_set_signal_handler:
-       /* Ensure all prior call_rcu are done. */
-       rcu_barrier();
 
        if (!retval) {
                exit(EXIT_SUCCESS);
index 857201def7d9d35d1228e23e9ed4d2472b4f2088..0299d5e952cfd5c946ef91916103e8f261b02623 100644 (file)
@@ -1212,8 +1212,6 @@ void lttng_consumer_cleanup(void)
         * it.
         */
        lttng_ht_destroy(consumer_data.stream_list_ht);
-
-       run_as_destroy_worker();
 }
 
 /*
This page took 0.029566 seconds and 5 git commands to generate.