]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
watch_fd also requires thread->fdlock[lockid] to be held
authorMark Andrews <marka@isc.org>
Wed, 2 Sep 2020 04:42:47 +0000 (14:42 +1000)
committerMark Andrews <marka@isc.org>
Wed, 2 Sep 2020 12:17:48 +0000 (12:17 +0000)
lib/isc/unix/socket.c

index 43883dbe6e6ecc97b5a07ca7d249b7d37030a293..a7e6804615da1b351956929fc1464e68cbf4c401 100644 (file)
@@ -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]);
 }
 
 /*