Fix: fix deadlock with dlopen() lttng-ust
[lttng-ust.git] / liblttng-ust / ltt-events.c
index 40cf3f916ee4c0056f2cde795bb857f4920a5230..d6f569e8a28bcdfc546dca4008dcf727e1226f53 100644 (file)
@@ -1458,3 +1458,16 @@ int ltt_wildcard_disable(struct session_wildcard *wildcard)
        wildcard->enabled = 0;
        return 0;
 }
+
+/*
+ * Take the TLS "fault" in libuuid if dlopen'd, which can take the
+ * dynamic linker mutex, outside of the UST lock, since the UST lock is
+ * taken in constructors, which are called with dynamic linker mutex
+ * held.
+ */
+void lttng_fixup_event_tls(void)
+{
+       unsigned char uuid[LTTNG_UST_UUID_STR_LEN];
+
+       (void) lttng_ust_uuid_generate(uuid);
+}
This page took 0.02466 seconds and 4 git commands to generate.