mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 21:47:59 +00:00
Merge branch '2582-threadsanitizer-data-race-lib-dns-zone-c-10272-7-in-zone_maintenance' into 'main'
Resolve "ThreadSanitizer: data race lib/dns/zone.c:10272:7 in zone_maintenance" Closes #2582 See merge request isc-projects/bind9!4864
This commit is contained in:
commit
e8313d91ea
@ -11063,6 +11063,7 @@ zone_maintenance(dns_zone_t *zone) {
|
|||||||
isc_time_t now;
|
isc_time_t now;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
bool dumping, load_pending, viewok;
|
bool dumping, load_pending, viewok;
|
||||||
|
bool need_notify;
|
||||||
|
|
||||||
REQUIRE(DNS_ZONE_VALID(zone));
|
REQUIRE(DNS_ZONE_VALID(zone));
|
||||||
ENTER;
|
ENTER;
|
||||||
@ -11147,11 +11148,15 @@ zone_maintenance(dns_zone_t *zone) {
|
|||||||
* Secondaries send notifies before backing up to disk,
|
* Secondaries send notifies before backing up to disk,
|
||||||
* primaries after.
|
* primaries after.
|
||||||
*/
|
*/
|
||||||
if ((zone->type == dns_zone_slave || zone->type == dns_zone_mirror) &&
|
LOCK_ZONE(zone);
|
||||||
(DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
|
need_notify = (zone->type == dns_zone_slave ||
|
||||||
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDSTARTUPNOTIFY)) &&
|
zone->type == dns_zone_mirror) &&
|
||||||
isc_time_compare(&now, &zone->notifytime) >= 0)
|
(DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
|
||||||
{
|
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDSTARTUPNOTIFY)) &&
|
||||||
|
(isc_time_compare(&now, &zone->notifytime) >= 0);
|
||||||
|
UNLOCK_ZONE(zone);
|
||||||
|
|
||||||
|
if (need_notify) {
|
||||||
zone_notify(zone, &now);
|
zone_notify(zone, &now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user