From 77971c85ca9f6d3c8725dc8bdb46b1a4f4671465 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 2 Mar 2018 17:36:25 -0500 Subject: [PATCH] Fix: reset cached vpid context on fork We currently reset the cached vtid on fork but not the vpid. This is not a problem on Linux because we don't cache the vpid internally but call getpid() directly and rely on the glibc pid cache. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- liblttng-ust/lttng-ust-comm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 6c11288c..b5c71da2 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -1970,6 +1970,7 @@ void ust_after_fork_child(sigset_t *restore_sigset) { if (URCU_TLS(lttng_ust_nest_count)) return; + lttng_context_vpid_reset(); lttng_context_vtid_reset(); DBG("process %d", getpid()); /* Release urcu mutexes */ -- 2.34.1