Fix: relayd: register listener threads as rcu readers
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 31 Jan 2020 21:12:24 +0000 (16:12 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 31 Jan 2020 21:14:34 +0000 (16:14 -0500)
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 <jeremie.galarneau@efficios.com>
Change-Id: I8aab8615b8db1f1fea48deb1ae03ad5beeaa6f32

src/bin/lttng-relayd/live.c
src/bin/lttng-relayd/main.c

index a64d69b02e37f1f4413957f8e7e6e514d34d1e3e..f28b9c66fa90fb89301287b8af9910d0aac7f5f0 100644 (file)
@@ -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");
index 8415e8cef106db18395a2666c79b555b68d418df..3295b009a40f1a93ddc766e288f1bd3cdcb2cf54 100644 (file)
@@ -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;
This page took 0.038362 seconds and 4 git commands to generate.