From: Mathieu Desnoyers Date: Thu, 14 Jul 2016 16:21:13 +0000 (-0400) Subject: Fix: cleanup local_apps.allowed flag on lib cleanup X-Git-Tag: v2.9.0-rc1~30 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=74f98bc94c69b76acfe4db62fbf78787a10bef75;p=lttng-ust.git Fix: cleanup local_apps.allowed flag on lib cleanup In case of applications using fork/clone, which drop their privileges, we need to clear the local_apps.allowed flag, otherwise those application get an assertion when using the liblttng-ust-fork helper: e.g. varnishd: lttng-ust-comm.c:423: setup_local_apps: Assertion `local_apps.allowed == 0' failed. Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 3959568b..a5a2cc2b 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -1715,6 +1715,7 @@ void lttng_ust_cleanup(int exiting) { cleanup_sock_info(&global_apps, exiting); cleanup_sock_info(&local_apps, exiting); + local_apps.allowed = 0; /* * The teardown in this function all affect data structures * accessed under the UST lock by the listener thread. This