]> 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 05:09:58 +0000 (05:09 +0000)
committerMark Andrews <marka@isc.org>
Thu, 2 Dec 2010 05:09:58 +0000 (05:09 +0000)
                        wrong lock which could lead to server deadlock.
                        [RT #22614]

CHANGES
lib/dns/rbtdb.c

diff --git a/CHANGES b/CHANGES
index 267c7be1075a54a81e5ec9c013b93ce876cd31bb..273d00639c323ac63ea2eef0eea407aa3e4c5082 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]
+
 2972.  [bug]           win32: address windows socket errors. [RT #21906]
 
 2971.  [bug]           Fixed a bug that caused journal files not to be
index 677cd31d4228bcfbac82b289a43199c81ea063a2..046fe50b367a14b576e0076139d68e076647649b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbtdb.c,v 1.270.12.25 2010/11/16 07:35:03 marka Exp $ */
+/* $Id: rbtdb.c,v 1.270.12.26 2010/12/02 05:09:58 marka Exp $ */
 
 /*! \file */
 
@@ -2096,7 +2096,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);
@@ -2106,7 +2106,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 {