2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

Merge branch '4529-abort-in-nsupdate-2' into 'main'

Resolve "Abort in nsupdate"

Closes #4529

See merge request isc-projects/bind9!8658
This commit is contained in:
Mark Andrews 2024-02-06 23:27:05 +00:00
commit 65a3450b8b
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,5 @@
6337. [bug] Nsupdate could assert while shutting down. [GL #4529]
6336. [func] Expose the zones with the 'first refresh' flag set in
statistics channel's "Incoming Zone Transfers" section
to indicate the zones that are not yet fully ready, and

View File

@ -190,15 +190,20 @@ requests_shutdown(void *arg) {
void
dns_requestmgr_shutdown(dns_requestmgr_t *requestmgr) {
bool first;
REQUIRE(VALID_REQUESTMGR(requestmgr));
req_log(ISC_LOG_DEBUG(3), "%s: %p", __func__, requestmgr);
rcu_read_lock();
INSIST(atomic_compare_exchange_strong(&requestmgr->shuttingdown,
&(bool){ false }, true));
first = atomic_compare_exchange_strong(&requestmgr->shuttingdown,
&(bool){ false }, true);
rcu_read_unlock();
if (!first) {
return;
}
/*
* Wait until all dns_request_create{raw}() are finished, so
* there will be no new requests added to the lists.