]> git.ipfire.org Git - thirdparty/bind9.git/commit
Pause the dbiterator before calling dns_db_find
authorMark Andrews <marka@isc.org>
Fri, 17 Sep 2021 02:55:07 +0000 (12:55 +1000)
committerOndřej Surý <ondrej@sury.org>
Wed, 29 Sep 2021 16:04:14 +0000 (18:04 +0200)
commit21771f5295f2d784b097068dc9efd73ca89d6a5e
tree237eb13cf012c284cb2e4198465e9fc317dafe4c
parentb166563e064e996a85304cf072e8265f5e107b76
Pause the dbiterator before calling dns_db_find

zone.c:integrity_checks() acquires a read lock while iterating the
zone database, and calls zone_check_mx() which acquires another
read lock. If another thread tries to acquire a write lock in the
meantime, it can deadlock. Calling dns_dbiterator_pause() to release
the first read lock prevents this.

(cherry picked from commit 4e1faa35d502cdaf9214e9f00407c9e06500d7c4)
lib/dns/zone.c