Added a comment to note that this function is assumed to be
called with the rcu_read_lock held.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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);
}
/*
* Lookup an agent in the session agents hash table by domain type and return
* the object if found else NULL.
+ *
+ * RCU read side lock must be acquired before calling and only released
+ * once the agent is no longer in scope or being used.
*/
struct agent *trace_ust_find_agent(struct ltt_ust_session *session,
enum lttng_domain_type domain_type)