2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +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 6336. [func] Expose the zones with the 'first refresh' flag set in
statistics channel's "Incoming Zone Transfers" section statistics channel's "Incoming Zone Transfers" section
to indicate the zones that are not yet fully ready, and to indicate the zones that are not yet fully ready, and

View File

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