From 318dfea93efe898f9d961978e085998eaf7b2220 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 26 Aug 2011 16:55:32 -0400 Subject: [PATCH] Fork handling: fix deadlock between mutex and semaphore Signed-off-by: Mathieu Desnoyers --- libust/lttng-ust-comm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libust/lttng-ust-comm.c b/libust/lttng-ust-comm.c index 58e9a648..e7680797 100644 --- a/libust/lttng-ust-comm.c +++ b/libust/lttng-ust-comm.c @@ -279,6 +279,7 @@ void cleanup_sock_info(struct sock_info *sock_info) } sock_info->root_handle = -1; } + sock_info->constructor_sem_posted = 0; } /* @@ -619,7 +620,7 @@ void ust_after_fork_child(ust_fork_info_t *fork_info) /* Release urcu mutexes */ rcu_bp_after_fork_child(); lttng_ust_cleanup(0); - lttng_ust_init(); /* Release mutexes and reenable signals */ ust_after_fork_common(fork_info); + lttng_ust_init(); } -- 2.34.1