mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
Merge branch '1968-cleanup-dead-nodes-fix' into 'main'
rbtdb: cleanup_dead_nodes should ignore alive nodes on the deadlist Closes #1968 See merge request isc-projects/bind9!3773
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,3 +1,7 @@
|
|||||||
|
5455. [bug] `named` could crash when cleaning dead nodes
|
||||||
|
in lib/dns/rbtdb.c that have been reused meanwhile.
|
||||||
|
[GL #1968]
|
||||||
|
|
||||||
5454. [bug] Address a startup crash happening when server is
|
5454. [bug] Address a startup crash happening when server is
|
||||||
under load and root zone is not yet loaded. [GL #1862]
|
under load and root zone is not yet loaded. [GL #1862]
|
||||||
|
|
||||||
|
@@ -68,3 +68,6 @@ Bug Fixes
|
|||||||
|
|
||||||
- Fix assertion failure when server is under load and root zone is not yet
|
- Fix assertion failure when server is under load and root zone is not yet
|
||||||
loaded. [GL #1862]
|
loaded. [GL #1862]
|
||||||
|
|
||||||
|
- ``named`` could crash when cleaning dead nodes in ``lib/dns/rbtdb.c`` that
|
||||||
|
have been reused meanwhile. [GL #1968]
|
||||||
|
@@ -1914,15 +1914,16 @@ cleanup_dead_nodes(dns_rbtdb_t *rbtdb, int bucketnum) {
|
|||||||
ISC_LIST_UNLINK(rbtdb->deadnodes[bucketnum], node, deadlink);
|
ISC_LIST_UNLINK(rbtdb->deadnodes[bucketnum], node, deadlink);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Since we're holding a tree write lock, it should be
|
* We might have reactivated this node without a tree write
|
||||||
* impossible for this node to be referenced by others.
|
* lock, so we couldn't remove this node from deadnodes then
|
||||||
*
|
* and we have to do it now.
|
||||||
* decrement_reference may not have tested node->down, as
|
|
||||||
* the tree_lock was not held, before adding the node to
|
|
||||||
* deadnodes so we test it here.
|
|
||||||
*/
|
*/
|
||||||
INSIST(isc_refcount_current(&node->references) == 0 &&
|
if (isc_refcount_current(&node->references) != 0 ||
|
||||||
node->data == NULL);
|
node->data != NULL) {
|
||||||
|
node = ISC_LIST_HEAD(rbtdb->deadnodes[bucketnum]);
|
||||||
|
count--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_leaf(node) && rbtdb->task != NULL) {
|
if (is_leaf(node) && rbtdb->task != NULL) {
|
||||||
send_to_prune_tree(rbtdb, node, isc_rwlocktype_write);
|
send_to_prune_tree(rbtdb, node, isc_rwlocktype_write);
|
||||||
|
Reference in New Issue
Block a user