]> git.ipfire.org Git - thirdparty/bind9.git/commit
Limit isc_async_run() overhead for tree pruning
authorMichał Kępień <michal@isc.org>
Thu, 4 Jan 2024 12:39:27 +0000 (13:39 +0100)
committerMichał Kępień <michal@isc.org>
Fri, 5 Jan 2024 11:33:14 +0000 (12:33 +0100)
commit24381cc36d8528f5a4046fb2614451aeac4cdfc1
treec1697ebd917f779b09f102553bea01f45db6395a
parentcddf3b267b4865c6fc9c65a3de06aacfda096db9
Limit isc_async_run() overhead for tree pruning

Instead of issuing a separate isc_async_run() call for every RBTDB node
that triggers tree pruning, maintain a list of nodes from which tree
pruning can be started from and only issue an isc_async_run() call if
pruning has not yet been triggered by another RBTDB node.

In some older BIND 9 branches, the extra queuing overhead eliminated by
this change could be remotely exploited to cause excessive memory use.
Due to architectural shift, this branch is not vulnerable to that issue,
but applying the fix to the latter is nevertheless deemed prudent for
consistency and to make the code future-proof.
lib/dns/include/dns/rbt.h
lib/dns/rbt.c
lib/dns/rbtdb.c
lib/dns/rbtdb_p.h