Take care of coverity warning ** CID
1226392: Data race condition (MISSING_LOCK)
/liblttng-ust/lttng-ust-comm.c: 1704 in lttng_ust_sockinfo_session_enabled()
It's not that the lock is missing, it's that we don't need to hold the
lock when doing the other modification.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
int ctor_passed = sock_info->constructor_sem_posted;
if (ctor_passed && sock_info->statedump_pending) {
- pthread_mutex_lock(&ust_fork_mutex);
sock_info->statedump_pending = 0;
+ pthread_mutex_lock(&ust_fork_mutex);
lttng_handle_pending_statedump(sock_info);
pthread_mutex_unlock(&ust_fork_mutex);
}