Commit 783e3f92 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Merge branch '1627-address-race-in-zone-maintenance' into 'main'

address race between zone_maintenance and dns_zone_setview_helper

Closes #1627

See merge request !3669
parents 5238433f 67c8f732
Pipeline #44911 passed with stages
in 4 minutes and 25 seconds
...@@ -10857,7 +10857,7 @@ zone_maintenance(dns_zone_t *zone) { ...@@ -10857,7 +10857,7 @@ zone_maintenance(dns_zone_t *zone) {
const char me[] = "zone_maintenance"; const char me[] = "zone_maintenance";
isc_time_t now; isc_time_t now;
isc_result_t result; isc_result_t result;
bool dumping, load_pending; bool dumping, load_pending, viewok;
   
REQUIRE(DNS_ZONE_VALID(zone)); REQUIRE(DNS_ZONE_VALID(zone));
ENTER; ENTER;
...@@ -10880,7 +10880,10 @@ zone_maintenance(dns_zone_t *zone) { ...@@ -10880,7 +10880,10 @@ zone_maintenance(dns_zone_t *zone) {
* adb or resolver will be NULL, and we had better not try * adb or resolver will be NULL, and we had better not try
* to do further maintenance on it. * to do further maintenance on it.
*/ */
if (zone->view == NULL || zone->view->adb == NULL) { LOCK_ZONE(zone);
viewok = (zone->view != NULL && zone->view->adb != NULL);
UNLOCK_ZONE(zone);
if (!viewok) {
return; return;
} }
   
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment