From: Ondřej Surý Date: Thu, 19 Mar 2026 18:04:09 +0000 (+0100) Subject: fix: dev: Fix data race in glue cache RCU pointer publication X-Git-Tag: v9.21.21~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea408e3c3db58699f402ab22c157f1ab1711fdc3;p=thirdparty%2Fbind9.git fix: dev: Fix data race in glue cache RCU pointer publication The liburcu rcu_cmpxchg_pointer() uses relaxed ordering on the CAS failure path. When two threads race to publish a new pointer and one loses the CAS, the returned pointer has no acquire semantics - reading fields through it is a data race on weakly-ordered architectures. Override rcu_cmpxchg_pointer() and rcu_xchg_pointer() to use acquire/release ordering via standard __atomic builtins, which also makes the operations natively visible to ThreadSanitizer. Closes #5182 Merge branch '5182-fix-false-tsan-report-in-addglue' into 'main' See merge request isc-projects/bind9!11719 --- ea408e3c3db58699f402ab22c157f1ab1711fdc3