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

CHANGES
lib/dns/rbtdb.c

diff --git a/CHANGES b/CHANGES
index cba3ccd7d5e94264af66dab37a3a92724d8797c6..97709215266779df3538490be9e250d3b07d0c52 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 fc90923e4312c27e687b192668c23bf43432d100..175a4ce156a78674c3fedc6c1d40f547065968c8 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbtdb.c,v 1.292.8.14 2010/11/16 07:28:37 marka Exp $ */
+/* $Id: rbtdb.c,v 1.292.8.15 2010/12/02 05:07:03 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 {