X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;fp=liblttng-ust%2Flttng-ust-comm.c;h=8b03125e28646701801cbed5b207e4c3d5fb5801;hb=57349053b60a11a6ba741fd88f70354e9f5d7cb1;hp=26c2e2907bcfdd9701dda4c7575432fdd1e33523;hpb=9197e7ece6a951447e2d84b4b2764cf508f2b493;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 26c2e290..8b03125e 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -81,6 +81,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; @@ -2024,6 +2026,7 @@ void ust_before_fork(sigset_t *save_sigset) ust_lock_nocheck(); rcu_bp_before_fork(); + lttng_ust_lock_fd_tracker(); } static void ust_after_fork_common(sigset_t *restore_sigset) @@ -2031,6 +2034,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);