From cadf81991b140ca1c04977589927bfdee86cfbe1 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 14 Jul 2016 17:47:08 -0400 Subject: [PATCH] Fix: reset vtid cache before releasing urcu locks When tracing pthread mutex lock/unlock, we need to reset the vtid context cache before unlocking the urcu lock, else we have vtid/vpid discrepancies. Signed-off-by: Mathieu Desnoyers --- liblttng-ust/lttng-ust-comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 862e513f..6c6eeda5 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -1846,11 +1846,11 @@ void ust_after_fork_child(sigset_t *restore_sigset) { if (URCU_TLS(lttng_ust_nest_count)) return; + lttng_context_vtid_reset(); DBG("process %d", getpid()); /* Release urcu mutexes */ rcu_bp_after_fork_child(); lttng_ust_cleanup(0); - lttng_context_vtid_reset(); /* Release mutexes and reenable signals */ ust_after_fork_common(restore_sigset); lttng_ust_init(); -- 2.34.1