Fix: cleanup local_apps.allowed flag on lib cleanup
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Jul 2016 16:21:13 +0000 (12:21 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Jul 2016 16:22:46 +0000 (12:22 -0400)
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 <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ust-comm.c

index e00a22ce4cae66dd7161111ba5de342dea7267b5..862e513feb86154f9e1c29d15e88b3d08af59cd8 100644 (file)
@@ -1696,6 +1696,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
This page took 0.025913 seconds and 4 git commands to generate.