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:56:01 +0000 (15:56 -0400)
commit8691397af304ca1d25170e04fab54a123362b90e
tree7404edcbd2739383924d61d9d10b5b6b1b92f93a
parentb3ed6b55db13c4569427a83001890518ddfb0537
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.026588 seconds and 4 git commands to generate.