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 21:12:46 +0000 (17:12 -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 433b15b76c7f30de89c66506df829842a238b6d4..9c2fe4a3ef084751429c12955642a207f8a7b3a7 100644 (file)
@@ -6100,11 +6100,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 9eb24c7a49df195c08e644e1aaba000c710608b5..01ecc24462713715b54686de2fbb67d039eb026c 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.029184 seconds and 4 git commands to generate.