From: Jérémie Galarneau Date: Fri, 18 Sep 2015 20:16:35 +0000 (-0400) Subject: Fix: Perform rcu barrier before tearing down the run-as worker X-Git-Tag: v2.7.0-rc2~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9c6916287d80063a10c8148f73aa16ff8b4efef2;p=lttng-tools.git Fix: Perform rcu barrier before tearing down the run-as worker Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index 7ecbe7a34..a56f02d1b 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -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); diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 433b15b76..9c2fe4a3e 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -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); diff --git a/src/common/consumer.c b/src/common/consumer.c index 9eb24c7a4..01ecc2446 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1212,8 +1212,6 @@ void lttng_consumer_cleanup(void) * it. */ lttng_ht_destroy(consumer_data.stream_list_ht); - - run_as_destroy_worker(); } /*