X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fagent-thread.c;h=2c018e9c686050263651f9c7ec54552ef45b536c;hb=f10db9cc56c280b504e5ece875c62da00d15722b;hp=0e827a4456d4c0ea9c37b54818bbcb6ba4c5e7a7;hpb=9474416fd76b18db4642bc60b15451b87d74e5d5;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/agent-thread.c b/src/bin/lttng-sessiond/agent-thread.c index 0e827a445..2c018e9c6 100644 --- a/src/bin/lttng-sessiond/agent-thread.c +++ b/src/bin/lttng-sessiond/agent-thread.c @@ -60,10 +60,12 @@ static void update_agent_app(struct agent_app *app) if (session->ust_session) { struct agent *agt; + rcu_read_lock(); agt = trace_ust_find_agent(session->ust_session, app->domain); if (agt) { agent_update(agt, app->sock->fd); } + rcu_read_unlock(); } session_unlock(session); } @@ -215,7 +217,7 @@ static int handle_registration(struct lttcomm_sock *reg_sock, size = new_sock->ops->recvmsg(new_sock, &msg, sizeof(msg), 0); if (size < sizeof(msg)) { - ret = -errno; + ret = -EINVAL; goto error_socket; } domain = be32toh(msg.domain);