X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=47ba36e5c9f1d9f1871c267469049708a7dd1e1e;hb=793d29c9367a58c2a368bc1ccb11b01c2d2bdac2;hp=0c6db9fea3326a835d7423357e5719b67c497246;hpb=eb0e6022d5e2621e0e0e50076ebe014c4e639411;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 0c6db9fe..47ba36e5 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -86,6 +86,8 @@ static int initialized; * * ust_lock nests within the dynamic loader lock (within glibc) because * it is taken within the library constructor. + * + * The ust fd tracker lock nests within the ust_mutex. */ static pthread_mutex_t ust_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -655,6 +657,10 @@ int handle_register_done(struct sock_info *sock_info) sock_info->registration_done = 1; decrement_sem_count(1); + if (!sock_info->statedump_pending) { + sock_info->initial_statedump_done = 1; + decrement_sem_count(1); + } return 0; } @@ -2061,6 +2067,7 @@ void ust_before_fork(sigset_t *save_sigset) ust_lock_nocheck(); urcu_bp_before_fork(); + lttng_ust_lock_fd_tracker(); } static void ust_after_fork_common(sigset_t *restore_sigset) @@ -2068,6 +2075,7 @@ static void ust_after_fork_common(sigset_t *restore_sigset) int ret; DBG("process %d", getpid()); + lttng_ust_unlock_fd_tracker(); ust_unlock(); pthread_mutex_unlock(&ust_fork_mutex);