]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix the glue table in the QP and RBT zone databases
authorOndřej Surý <ondrej@isc.org>
Thu, 4 Jul 2024 08:07:18 +0000 (10:07 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 13:36:54 +0000 (15:36 +0200)
commit5beae5faf9c6b46f4cee23e4ea2557bef6afa711
tree72e6dbf836107f15427b66ac2e6ba8e9e6b9e81b
parenta26055f03ec9659890fac39f23f39b1c3c7c01fa
Fix the glue table in the QP and RBT zone databases

When adding glue to the header, we add header to the wait-free stack to
be cleaned up later which sets wfc_node->next to non-NULL value.  When
the actual cleaning happens we would only cleanup the .glue_list, but
since the database isn't locked for the time being, the headers could be
reused while cleaning the existing glue entries, which creates a data
race between database versions.

Revert the code back to use per-database-version hashtable where keys
are the node pointers.  This allows each database version to have
independent glue cache table that doesn't affect nodes or headers that
could already "belong" to the future database version.
lib/dns/db.c
lib/dns/db_p.h
lib/dns/include/dns/db.h
lib/dns/include/dns/rdataslab.h
lib/dns/qpzone.c
lib/dns/rbt-zonedb.c
lib/dns/rbtdb.c
lib/dns/rbtdb_p.h
lib/dns/rdataslab.c