Fix: fd tracker: do not allow signal handlers to close lttng-ust FDs
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 7 Oct 2019 19:41:10 +0000 (15:41 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 7 Oct 2019 19:55:58 +0000 (15:55 -0400)
commitee6b2e664563927c55539f6a5190d7281ef47c3b
tree9d0c96d2bc334149b1f9e6e986c3da0c4266fba7
parent5932ab6faf3406b53687d54bf2804bbecb9ed7b4
Fix: fd tracker: do not allow signal handlers to close lttng-ust FDs

Split the thread_fd_tracking state from the ust_fd_mutex_nest used to
track whether a signal handler is nested over a fd tracker lock.

lttng-ust listener threads need to invoke
lttng_ust_fd_tracker_register_thread() so the fd tracker can
distinguish them from application threads.

Otherwise, using ust_fd_mutex_nest to try to distinguish between
ust and application threads makes it possible for signal handlers
to appear as if they are ust listener threads, and thus attempt to
close UST file descriptors.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fixes: #1199
include/ust-fd.h
liblttng-ust-comm/lttng-ust-fd-tracker.c
liblttng-ust/lttng-ust-comm.c
This page took 0.024295 seconds and 4 git commands to generate.