]> git.ipfire.org Git - thirdparty/bind9.git/commit
Break lock order loop by sending TAT in an event
authorMark Andrews <marka@isc.org>
Tue, 22 Sep 2020 05:22:34 +0000 (15:22 +1000)
committerMark Andrews <marka@isc.org>
Tue, 22 Sep 2020 13:04:44 +0000 (23:04 +1000)
commitf2c0aa1dfeec4e2b8bb03ffa11c2eddf2dcd5025
tree262bcded1e12eb6ed7e1c42b46fac644385c3206
parent2d351436e5e3183744af452a6e8867448f14a0b4
Break lock order loop by sending TAT in an event

The dotat() function has been changed to send the TAT
query asynchronously, so there's no lock order loop
because we initialize the data first and then we schedule
the TAT send to happen asynchronously.

This breaks following lock-order loops:

zone->lock (dns_zone_setviewcommit) while holding view->lock
(dns_view_setviewcommit)

keytable->lock (dns_keytable_find) while holding zone->lock
(zone_asyncload)

view->lock (dns_view_findzonecut) while holding keytable->lock
(dns_keytable_forall)

(cherry picked from commit 3c4b68af7c0cd8213bcae92faee3bf2a7e9284d1)
bin/named/include/named/server.h
bin/named/server.c