From: Jérémie Galarneau Date: Fri, 31 Jan 2020 21:12:24 +0000 (-0500) Subject: Fix: relayd: register listener threads as rcu readers X-Git-Tag: v2.12.0-rc1~19 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=8fba2b8dfd9d2e9070741e082b9c1f84cb33f799 Fix: relayd: register listener threads as rcu readers Both live and consumer listener threads are now RCU readers as they use the fd_tracker which makes use of RCU. Signed-off-by: Jérémie Galarneau Change-Id: I8aab8615b8db1f1fea48deb1ae03ad5beeaa6f32 --- diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index a64d69b02..f28b9c66f 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -598,6 +598,7 @@ void *thread_listener(void *data) DBG("[thread] Relay live listener started"); + rcu_register_thread(); health_register(health_relayd, HEALTH_RELAYD_TYPE_LIVE_LISTENER); health_code_update(); @@ -739,6 +740,7 @@ error_sock_control: DBG("Live viewer listener thread exited with error"); } health_unregister(health_relayd); + rcu_unregister_thread(); DBG("Live viewer listener thread cleanup complete"); if (lttng_relay_stop_threads()) { ERR("Error stopping threads"); diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 8415e8cef..3295b009a 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -1075,6 +1075,7 @@ static void *relay_thread_listener(void *data) DBG("[thread] Relay listener started"); + rcu_register_thread(); health_register(health_relayd, HEALTH_RELAYD_TYPE_LISTENER); health_code_update(); @@ -1258,6 +1259,7 @@ error_sock_control: ERR("Health error occurred in %s", __func__); } health_unregister(health_relayd); + rcu_unregister_thread(); DBG("Relay listener thread cleanup complete"); lttng_relay_stop_threads(); return NULL;