From a2817541b3f619fd6ad55f34e65b81bd9f46e913 Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Mon, 27 Mar 2023 10:56:22 +0000 Subject: [PATCH] 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. --- lib/dns/catz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 58cd369312..4dc8caaa3e 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;