]> git.ipfire.org Git - thirdparty/bind9.git/commit
lib/dns/resolver.c: Convert (dns_view_t *)->weakrefs to isc_refcount_t
authorOndřej Surý <ondrej@sury.org>
Thu, 1 Aug 2019 09:42:58 +0000 (11:42 +0200)
committerOndřej Surý <ondrej@sury.org>
Wed, 7 Aug 2019 10:43:12 +0000 (12:43 +0200)
commitcd9bbe6dea9c2cc8a7d95ceaee6845108c90361c
tree59c886260607bad21929f60e0e4ca697d7c199c2
parentf03aaaa6b50b588461c4e6215e1a112b0046fd3e
lib/dns/resolver.c: Convert (dns_view_t *)->weakrefs to isc_refcount_t

There's a deadlock in BIND 9 code where (dns_view_t){ .lock } and
(dns_resolver_t){ .buckets[i].lock } gets locked in different order.  When
view->weakrefs gets converted to a reference counting we can reduce the locking
in dns_view_weakdetach only to cases where it's the last instance of the
dns_view_t object.

(cherry picked from commit a7c9a52c89146490a0e797df2119026a268f294c)
(cherry picked from commit 232140edae6b80f8344db234cda28f8456269a6e)
lib/dns/include/dns/view.h
lib/dns/view.c