2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

address lock order inversion

This commit is contained in:
Mark Andrews
2019-12-12 17:43:03 +11:00
parent 80c476721c
commit ad12c2f3b0

View File

@@ -168,7 +168,6 @@ nm_destroy(isc_nm_t **mgr0) {
isc_refcount_destroy(&mgr->references);
LOCK(&mgr->lock);
mgr->magic = 0;
for (size_t i = 0; i < mgr->nworkers; i++) {
@@ -181,6 +180,7 @@ nm_destroy(isc_nm_t **mgr0) {
isc__nm_enqueue_ievent(&mgr->workers[i], event);
}
LOCK(&mgr->lock);
while (atomic_load(&mgr->workers_running) > 0) {
WAIT(&mgr->wkstatecond, &mgr->lock);
}