]> git.ipfire.org Git - thirdparty/bind9.git/commit
Inactive incorrectly incremented
authorMark Andrews <marka@isc.org>
Fri, 18 Dec 2020 02:31:07 +0000 (13:31 +1100)
committerMark Andrews <marka@isc.org>
Wed, 6 Jan 2021 08:18:54 +0000 (19:18 +1100)
commit25150c15e7cfa73289f04470e2e699ebb7c28fef
treed9facbbb47e6611f3ba7dd9cf2e0187ec158682d
parent576e48f7d5b7a3471649e1f4ae8b07f2a4dc8660
Inactive incorrectly incremented

It is possible to have two threads destroying an rbtdb at the same
time when detachnode() executes and removes the last reference to
a node between exiting being set to true for the node and testing
if the references are zero in maybe_free_rbtdb().  Move NODE_UNLOCK()
to after checking if references is zero to prevent detachnode()
changing the reference count too early.

(cherry picked from commit 859d2fdad6d1c6ff20083a4c463a929cbeb26438)
lib/dns/rbtdb.c