From: Mathieu Desnoyers Date: Thu, 14 Jul 2016 21:47:08 +0000 (-0400) Subject: Fix: reset vtid cache before releasing urcu locks X-Git-Tag: v2.7.5~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9f85f64c20e9edede18c37cbed7f011c09bd0be5;p=lttng-ust.git 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 --- diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 8e86896f..7842af79 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -1771,11 +1771,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();