From: Aram Sargsyan Date: Mon, 27 Mar 2023 10:56:22 +0000 (+0000) Subject: Fix a data race in dns__catz_update_cb() X-Git-Tag: v9.19.12~64^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2817541b3f619fd6ad55f34e65b81bd9f46e913;p=thirdparty%2Fbind9.git Fix a data race in dns__catz_update_cb() The dns__catz_update_cb() function was earlier updated (see d2ecff3c4a0d961041b860515858d258d40462d7) to use a separate 'dns_db_t' object ('catz->updb' instead of 'catz->db') to avoid a race between the 'dns__catz_update_cb()' and 'dns_catz_dbupdate_callback()' functions, but the 'REQUIRE' check there still checks the validity of the 'catz->db' object. Fix the omission. --- diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 58cd369312a..4dc8caaa3e7 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -2234,7 +2234,7 @@ dns__catz_update_cb(void *data) { uint32_t catz_vers; REQUIRE(DNS_CATZ_ZONE_VALID(catz)); - REQUIRE(DNS_DB_VALID(catz->db)); + REQUIRE(DNS_DB_VALID(catz->updb)); REQUIRE(DNS_CATZ_ZONES_VALID(catz->catzs)); updb = catz->updb;