]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix deadlock caused by incoming notify for auth-zone.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 4 Jun 2018 09:01:55 +0000 (09:01 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 4 Jun 2018 09:01:55 +0000 (09:01 +0000)
git-svn-id: file:///svn/unbound/trunk@4704 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/authzone.c

index 8f74bd06f69f50b0218e5fb841d476de54a98cf7..a199a9fea980fbc2cd0b0f4f5d7d3aba35529cd3 100644 (file)
@@ -1,3 +1,6 @@
+4 June 2018: Wouter
+       - Fix deadlock caused by incoming notify for auth-zone.
+
 1 June 2018: Wouter
        - Rename additional-tls-port to tls-additional-ports.
          The older name is accepted for backwards compatibility.
index 1f56ac8cfc870517eacbba258deffdbf2c9eac19..7ec280bafd92505002b8c236f0ad9d511ae33567 100644 (file)
@@ -3425,14 +3425,17 @@ xfr_process_notify(struct auth_xfer* xfr, struct module_env* env,
 {
        /* if the serial of notify is older than we have, don't fetch
         * a zone, we already have it */
-       if(has_serial && !xfr_serial_means_update(xfr, serial))
+       if(has_serial && !xfr_serial_means_update(xfr, serial)) {
+               lock_basic_unlock(&xfr->lock);
                return;
+       }
        /* start new probe with this addr src, or note serial */
        if(!xfr_start_probe(xfr, env, fromhost)) {
                /* not started because already in progress, note the serial */
                xfr_note_notify_serial(xfr, has_serial, serial);
                lock_basic_unlock(&xfr->lock);
        }
+       /* successful end of start_probe unlocked xfr->lock */
 }
 
 int auth_zones_notify(struct auth_zones* az, struct module_env* env,