mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
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.
This commit is contained in:
@@ -1082,15 +1082,12 @@ dns_slabheader_reset(dns_slabheader_t *h, dns_db_t *db, dns_dbnode_t *node) {
|
||||
ISC_LINK_INIT(h, link);
|
||||
h->heap_index = 0;
|
||||
h->heap = NULL;
|
||||
h->glue_list = NULL;
|
||||
h->db = db;
|
||||
h->node = node;
|
||||
|
||||
atomic_init(&h->attributes, 0);
|
||||
atomic_init(&h->last_refresh_fail_ts, 0);
|
||||
|
||||
cds_wfs_node_init(&h->wfs_node);
|
||||
|
||||
STATIC_ASSERT((sizeof(h->attributes) == 2),
|
||||
"The .attributes field of dns_slabheader_t needs to be "
|
||||
"16-bit int type exactly.");
|
||||
|
Reference in New Issue
Block a user