]> git.ipfire.org Git - thirdparty/bind9.git/commit
Resolve TSAN data race in zone_maintenance
authorDiego Fronza <diego@isc.org>
Tue, 6 Apr 2021 19:29:25 +0000 (16:29 -0300)
committerDiego dos Santos Fronza <diego@isc.org>
Wed, 7 Apr 2021 12:04:01 +0000 (12:04 +0000)
commit6e08307bc8bbe64afa2af891c2b570740a454e63
tree4ba27e232cba220c66ae3400c80ee3ec0b8a1670
parent2e5a6ab7fc86a1c2dcd21bd45ea222bcfd2dfa36
Resolve TSAN data race in zone_maintenance

Fix race between zone_maintenance and dns_zone_notifyreceive functions,
zone_maintenance was attempting to read a zone flag calling
DNS_ZONE_FLAG(zone, flag) while dns_zone_notifyreceive was updating
a flag in the same zone calling DNS_ZONE_SETFLAG(zone, ...).

The code reading the flag in zone_maintenance was not protected by the
zone's lock, to avoid a race the zone's lock is now being acquired
before an attempt to read the zone flag is made.
lib/dns/zone.c