From 8fba2b8dfd9d2e9070741e082b9c1f84cb33f799 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 31 Jan 2020 16:12:24 -0500 Subject: [PATCH] Fix: relayd: register listener threads as rcu readers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-relayd/live.c | 2 ++ src/bin/lttng-relayd/main.c | 2 ++ 2 files changed, 4 insertions(+) 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; -- 2.34.1