]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2975. [bug] rbtdb.c:cleanup_dead_nodes_callback() aquired the
authorMark Andrews <marka@isc.org>
Thu, 2 Dec 2010 04:58:13 +0000 (04:58 +0000)
committerMark Andrews <marka@isc.org>
Thu, 2 Dec 2010 04:58:13 +0000 (04:58 +0000)
                        wrong lock which could lead to server deadlock.
                        [RT #22614]

CHANGES
lib/dns/rbtdb.c

diff --git a/CHANGES b/CHANGES
index 318f638997d23ce26576ed573e01420c35a9bc69..00df744b4f7ec42668ee304ef0f576d1ec090233 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+2975.  [bug]           rbtdb.c:cleanup_dead_nodes_callback() aquired the
+                       wrong lock which could lead to server deadlock.
+                       [RT #22614]
+
 2974.  [bug]           Some vaild UPDATE requests could fail due to a
                        consistency check examining the existing version
                        of the zone rather than the new version resulting
index 5f3b95bcb59f1a5aac013cb0666ddb10246309e9..0b120d79e716fbb4533131fa058c1f7074f9f553 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbtdb.c,v 1.306 2010/11/16 06:46:44 marka Exp $ */
+/* $Id: rbtdb.c,v 1.307 2010/12/02 04:58:13 marka Exp $ */
 
 /*! \file */
 
@@ -2115,7 +2115,7 @@ cleanup_dead_nodes_callback(isc_task_t *task, isc_event_t *event) {
        unsigned int locknum;
        unsigned int refs;
 
-       RBTDB_LOCK(&rbtdb->lock, isc_rwlocktype_write);
+       RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_write);
        for (locknum = 0; locknum < rbtdb->node_lock_count; locknum++) {
                NODE_LOCK(&rbtdb->node_locks[locknum].lock,
                          isc_rwlocktype_write);
@@ -2125,7 +2125,7 @@ cleanup_dead_nodes_callback(isc_task_t *task, isc_event_t *event) {
                NODE_UNLOCK(&rbtdb->node_locks[locknum].lock,
                            isc_rwlocktype_write);
        }
-       RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write);
+       RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_write);
        if (again)
                isc_task_send(task, &event);
        else {