]> git.ipfire.org Git - thirdparty/bind9.git/commit
Request exclusive access when crashing via fatal()
authorOndřej Surý <ondrej@isc.org>
Fri, 22 Nov 2019 10:39:57 +0000 (11:39 +0100)
committerOndřej Surý <ondrej@isc.org>
Tue, 26 Nov 2019 12:56:02 +0000 (13:56 +0100)
commit1e96fb8dc07d4d7dc1aefadca15ac4b625364da5
tree498c98a84363821da8398e8548f83ba064feedc4
parentfff784b061cf6629b713c6838b1a53f158ea5727
Request exclusive access when crashing via fatal()

When loading the configuration fails, there might be already other tasks
running and calling OpenSSL library functions.  The OpenSSL on_exit
handler is called when exiting the main process and there's a timing
race between the on_exit function that destroys OpenSSL allocated
resources (threads, locks, ...) and other tasks accessing the very same
resources leading to a crash in the system threading library. Therefore,
the fatal() function needs to request exlusive access to the task
manager to finish the already running tasks and exit only when no other
tasks are running.

(cherry picked from commit 952d7fde63dbe68f1a2955688ea06edf9eacc9e2)
bin/named/server.c