]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
778. [bug] When starting cache cleaning, cleaning_timer_action()
authorAndreas Gustafsson <source@isc.org>
Tue, 13 Mar 2001 23:43:03 +0000 (23:43 +0000)
committerAndreas Gustafsson <source@isc.org>
Tue, 13 Mar 2001 23:43:03 +0000 (23:43 +0000)
                        returned without first pausing the iterator, which
                        could cause deadlock. [RT #998]
(already fixed on mainline)

CHANGES
lib/dns/cache.c

diff --git a/CHANGES b/CHANGES
index f67970e5cdc9a7b211d6a322e6130e703b1b929f..6c942208122a1ef1969865704051d3a682c090d2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,13 @@
 
+       --- 9.1.1 released ---
+
+ 778.  [bug]           When starting cache cleaning, cleaning_timer_action()
+                       returned without first pausing the iterator, which
+                       could cause deadlock. [RT #998]
+
  777.  [bug]           An empty forwarders list in a zone failed to override
                        global forwarders. [RT #995]
 
-       --- 9.1.1 released ---
-
  775.   [bug]          Address match lists with invalid netmasks caused
                        the configuration parser to abort with an assertion
                        failure. [RT #996]
index b437d288d8bae7c6ccce3e298c6b9020180fe2c4..7f815ff63cd934eb73347c21bf580c6882f2a6af 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: cache.c,v 1.31.2.1 2001/01/09 22:43:25 bwelling Exp $ */
+/* $Id: cache.c,v 1.31.2.2 2001/03/13 23:43:03 gson Exp $ */
 
 #include <config.h>
 
@@ -456,6 +456,14 @@ begin_cleaning(cache_cleaner_t *cleaner) {
                goto destroyiter;
        }
 
+       /*
+        * Pause the iterator to make sure its tree lock is
+        * released before we return from the current event
+        * handler.
+        */
+       result = dns_dbiterator_pause(cleaner->iterator);
+       RUNTIME_CHECK(result == ISC_R_SUCCESS);
+
        isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
                      DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
                      "begin cache cleaning");