Fix: reset vtid cache before releasing urcu locks
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Jul 2016 21:47:08 +0000 (17:47 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Jul 2016 21:48:32 +0000 (17:48 -0400)
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 <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ust-comm.c

index 862e513feb86154f9e1c29d15e88b3d08af59cd8..6c6eeda51a960c4b3632486faa67adc4e49b0ef0 100644 (file)
@@ -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();
This page took 0.026045 seconds and 4 git commands to generate.