]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2414. [bug] A masterdump context held the database lock too long,
authorTatuya JINMEI 神明達哉 <jinmei@isc.org>
Wed, 13 Aug 2008 02:24:25 +0000 (02:24 +0000)
committerTatuya JINMEI 神明達哉 <jinmei@isc.org>
Wed, 13 Aug 2008 02:24:25 +0000 (02:24 +0000)
causing various troubles such as dead lock and
recursive lock acquisition. [RT #18311, #18456]

CHANGES
lib/dns/masterdump.c

diff --git a/CHANGES b/CHANGES
index 69f9298f8100f0c2980b6df70d98ff070fa15aab..f7c9d9fd238dfd13f83d6c81e6a2d0814c06435b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+2414.  [bug]           A masterdump context held the database lock too long,
+                       causing various troubles such as dead lock and
+                       recursive lock acquisition. [RT #18311, #18456]
+
 2413.  [bug]           Fixed an unreachable code path in socket.c. [RT #18442]
 
 2412.  [bug]           win32: address a resourse leak. [RT #18374]
index 0f4716d583d975a1e6137038e7469956b6e722e5..1e37555a1bbeff921f7c13df31def8761e6ec1e6 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.c,v 1.56.2.5.2.15 2006/03/10 00:17:21 marka Exp $ */
+/* $Id: masterdump.c,v 1.56.2.5.2.16 2008/08/13 02:24:25 jinmei Exp $ */
 
 #include <config.h>
 
@@ -1159,13 +1159,12 @@ dumptostreaminc(dns_dumpctx_t *dctx) {
                result = dns_dbiterator_next(dctx->dbiter);
        }
 
-       if (dctx->nodes != 0 && result == ISC_R_SUCCESS) {
-               result = dns_dbiterator_pause(dctx->dbiter);
-               RUNTIME_CHECK(result == ISC_R_SUCCESS);
+       if (dctx->nodes != 0 && result == ISC_R_SUCCESS)
                result = DNS_R_CONTINUE;
-       else if (result == ISC_R_NOMORE)
+       else if (result == ISC_R_NOMORE)
                result = ISC_R_SUCCESS;
  fail:
+       RUNTIME_CHECK(dns_dbiterator_pause(dctx->dbiter) == ISC_R_SUCCESS);
        isc_mem_put(dctx->mctx, buffer.base, buffer.length);
        return (result);
 }