]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix datarace when UDP/TCP connect fails and we are in nmthread
authorOndřej Surý <ondrej@sury.org>
Thu, 3 Dec 2020 12:00:33 +0000 (13:00 +0100)
committerOndřej Surý <ondrej@sury.org>
Wed, 9 Dec 2020 09:46:16 +0000 (10:46 +0100)
commit7ec4ec3a816c15f622ed32b70405ccd915db2844
treeb6f488019223229b21c960ffa655b018bbd545e4
parent90a9b0611a9878e224496bc8f4852118cad10148
Fix datarace when UDP/TCP connect fails and we are in nmthread

When we were in nmthread, the isc__nm_async_<proto>connect() function
executes in the same thread as the isc__nm_<proto>connect() and on a
failure, it would block indefinitely because the failure branch was
setting sock->active to false before the condition around the wait had a
chance to skip the WAIT().

This also fixes the zero system test being stuck on FreeBSD 11, so we
re-enable the test in the commit.
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c
lib/isc/netmgr/udp.c