X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=2a9423dcfafee2933b44a3b8947fd4dbc364ece6;hp=de654a4ee8bade30772e1fc73af04174179a8638;hb=98b5ff34df5d330fe139907ed77b4327ce9afa48;hpb=d7b377ed1acd4043bde353d99122e0e56fa4e975 diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index de654a4ee..2a9423dcf 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -3189,6 +3189,7 @@ int handle_notification_thread_client_in( size_t offset; bool message_is_complete = false; + rcu_read_lock(); client = get_client_from_socket(socket, state); if (!client) { /* Internal error, abort. */ @@ -3234,12 +3235,13 @@ int handle_notification_thread_client_in( } } end: + rcu_read_unlock(); return ret; error_disconnect_client: pthread_mutex_lock(&client->lock); ret = notification_thread_client_disconnect(client, state); pthread_mutex_unlock(&client->lock); - return ret; + goto end; } /* Client ready to receive outgoing data. */ @@ -3250,6 +3252,7 @@ int handle_notification_thread_client_out( struct notification_client *client; enum client_transmission_status transmission_status; + rcu_read_lock(); client = get_client_from_socket(socket, state); if (!client) { /* Internal error, abort. */ @@ -3266,6 +3269,7 @@ int handle_notification_thread_client_out( goto end; } end: + rcu_read_unlock(); return ret; }