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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user