mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Expire names in shutdown_names() under the lock
Since there could be fetches running, we need to run expire_name() under the lock when shutting down the names.
This commit is contained in:
@@ -766,6 +766,8 @@ shutdown_names(dns_adb_t *adb) {
|
|||||||
name = next)
|
name = next)
|
||||||
{
|
{
|
||||||
next = ISC_LIST_NEXT(name, link);
|
next = ISC_LIST_NEXT(name, link);
|
||||||
|
dns_adbname_ref(name);
|
||||||
|
LOCK(&name->lock);
|
||||||
/*
|
/*
|
||||||
* Run through the list. For each name, clean up finds
|
* Run through the list. For each name, clean up finds
|
||||||
* found there, and cancel any fetches running. When
|
* found there, and cancel any fetches running. When
|
||||||
@@ -773,6 +775,8 @@ shutdown_names(dns_adb_t *adb) {
|
|||||||
* itself.
|
* itself.
|
||||||
*/
|
*/
|
||||||
expire_name(name, DNS_EVENT_ADBSHUTDOWN, INT_MAX);
|
expire_name(name, DNS_EVENT_ADBSHUTDOWN, INT_MAX);
|
||||||
|
UNLOCK(&name->lock);
|
||||||
|
dns_adbname_detach(&name);
|
||||||
}
|
}
|
||||||
UNLOCK(&adb->names_lock);
|
UNLOCK(&adb->names_lock);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user