mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-17 11:50:46 -04:00
When dns_adb is shutting down, first the adb->shutting_down flag is set and then task is created that runs shutdown_stage2() that sets the shutdown flag on names and entries. However, when dns_adb_createfind() is called, only the individual shutdown flags are being checked, and the global adb->shutting_down flag was not checked. Because of that it was possible for a different thread to slip in and create new find between the dns_adb_shutdown() and dns_adb_detach(), but before the shutdown_stage2() task is complete. This was detected by ThreadSanitizer as data race because the zonetable might have been already detached by dns_view shutdown process and simultaneously accessed by dns_adb_createfind(). This commit converts the adb->shutting_down to atomic_bool to prevent the global adb lock when creating the find. |
||
|---|---|---|
| .. | ||
| bind9 | ||
| dns | ||
| irs | ||
| isc | ||
| isccc | ||
| isccfg | ||
| ns | ||
| .gitignore | ||
| Makefile.am | ||
| unit-test-driver.sh.in | ||