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:55 +0000 (15:55 -0400)
commit01be959de2f1879fcd54a47a74ff443e2ef12f90
tree324c360277b249c31f04cc2f6895da7a5f0916bd
parent8ca5fb48f84862619c4b780beaf37b347494b372
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.028369 seconds and 4 git commands to generate.