From 22f499cdc4f0f683b79d17a6b375df4f1ee4c7cc Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 2 Sep 2020 14:42:47 +1000 Subject: [PATCH] watch_fd also requires thread->fdlock[lockid] to be held --- lib/isc/unix/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 43883dbe6e..a7e6804615 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]); } /*