From: Mark Andrews Date: Wed, 2 Sep 2020 04:42:47 +0000 (+1000) Subject: watch_fd also requires thread->fdlock[lockid] to be held X-Git-Tag: v9.17.5~9^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=22f499cdc4f0f683b79d17a6b375df4f1ee4c7cc;p=thirdparty%2Fbind9.git watch_fd also requires thread->fdlock[lockid] to be held --- diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 43883dbe6e6..a7e6804615d 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -890,7 +890,6 @@ wakeup_socket(isc__socketthread_t *thread, int fd, int msg) { UNLOCK(&thread->fdlock[lockid]); return; } - UNLOCK(&thread->fdlock[lockid]); /* * Set requested bit. @@ -907,6 +906,7 @@ wakeup_socket(isc__socketthread_t *thread, int fd, int msg) { "failed to start watching FD (%d): %s", fd, isc_result_totext(result)); } + UNLOCK(&thread->fdlock[lockid]); } /*