]> git.ipfire.org Git - thirdparty/bind9.git/commit
Resolve TSAN data race in zone_maintenance
authorDiego Fronza <diego@isc.org>
Wed, 7 Apr 2021 13:48:12 +0000 (10:48 -0300)
committerDiego Fronza <diego@isc.org>
Wed, 7 Apr 2021 13:48:12 +0000 (10:48 -0300)
commite2e6fd4fa09494c703774c3adb838bfca79b899b
tree143278dab0378bad373eb580d776fc932d2664c7
parent58808db1335016bf2e12bfa259575bf934db7775
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