Fixes possible race condition where an event registration is received
before its channel registration by the consumer.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
/* Set transient enabler state to "enabled" */
session->tstate = 1;
- /* We need to sync enablers with session before activation. */
- lttng_session_sync_enablers(session);
/*
* Snapshot the number of events per channel to know the type of header
}
}
+ /* We need to sync enablers with session before activation. */
+ lttng_session_sync_enablers(session);
+
/* Set atomically the state to "active" */
CMM_ACCESS_ONCE(session->active) = 1;
CMM_ACCESS_ONCE(session->been_active) = 1;