5418. [bug] delv failed to parse deprecated trusted-keys style
trust anchors. [GL #1860]
+5416. [bug] Fix a lock order inversion in unix/socket.c. [GL #1859]
+
5415. [test] Address race in dnssec system test that led to
test failures. [GL #1852]
dev = ISC_LIST_HEAD(sock->accept_list);
if (dev == NULL) {
unwatch_fd(thread, sock->fd, SELECT_POKE_ACCEPT);
+ UNLOCK(&sock->lock);
return;
}
}
}
+ /*
+ * We need to unlock sock->lock now to be able to lock manager->lock
+ * without risking a deadlock with xmlstats.
+ */
+ UNLOCK(&sock->lock);
+
/*
* -1 means the new socket didn't happen.
*/
soft_error:
watch_fd(thread, sock->fd, SELECT_POKE_ACCEPT);
+ UNLOCK(&sock->lock);
inc_stats(manager->stats, sock->statsindex[STATID_ACCEPTFAIL]);
return;
unwatch_fd(&sock->manager->threads[sock->threadid], sock->fd,
SELECT_POKE_READ);
}
+ UNLOCK(&sock->lock);
}
static void
unwatch_fd(&sock->manager->threads[sock->threadid], sock->fd,
SELECT_POKE_WRITE);
}
+ UNLOCK(&sock->lock);
}
/*
}
LOCK(&sock->lock);
+
if (sock->fd < 0) {
/*
* Sock is being closed - the final external reference
* thread->fdlock[lockid] or sock->lock that we're holding.
* Just release the locks and bail.
*/
- goto unlock;
+ UNLOCK(&sock->lock);
+ UNLOCK(&thread->fdlock[lockid]);
+ return;
}
+ REQUIRE(readable || writeable);
if (readable) {
if (sock->listener) {
internal_accept(sock);
}
}
-unlock:
- UNLOCK(&sock->lock);
+ /* sock->lock is unlocked in internal_* function */
UNLOCK(&thread->fdlock[lockid]);
+
/*
* Socket destruction might be pending, it will resume
* after releasing fdlock and sock->lock.
finish:
unwatch_fd(&sock->manager->threads[sock->threadid], sock->fd,
SELECT_POKE_CONNECT);
+ UNLOCK(&sock->lock);
}
isc_result_t