Files
bind9/lib/dns
Ondřej Surý f326d45135 Lock view while accessing its zone table
Commit 308bc46a59 introduced a change to
the view_flushanddetach() function which makes the latter access
view->zonetable without holding view->lock.  As confirmed by TSAN, this
enables races between threads for view->zonetable accesses.

Swap the view->zonetable pointer under view lock and then detach the
local swapped dns_zt_t later when the view lock is already unlocked.

This commit also changes the dns_zt interfaces, so the setting the
zonetable "flush" flag is separate operation to dns_zt_detach,
e.g. instead of doing:

    if (view->flush) {
        dns_zt_flushanddetach(&zt);
    } else {
        dns_zt_detach(&zt);
    }

the code is now:

    if (view->flush) {
        dns_zt_flush(zt);
    }
    dns_zt_detach(&zt);

making the code more consistent with how we handle flushing and
detaching dns_zone_t pointers from the view.
2022-01-05 16:56:16 +01:00
..
2021-12-14 15:03:56 +01:00
2021-11-01 15:17:31 +01:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-12-08 10:22:03 -08:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-09-09 15:35:39 +02:00
2021-10-06 11:22:20 +02:00
2021-10-13 00:49:15 -07:00
2021-10-06 11:22:20 +02:00
2021-10-13 00:49:15 -07:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-07-06 05:33:48 +00:00
2021-10-12 13:11:13 -07:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-12-14 15:03:56 +01:00
2021-10-13 00:49:15 -07:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-13 00:49:15 -07:00
2021-12-14 15:03:56 +01:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-10-13 00:49:15 -07:00
2021-10-06 11:22:20 +02:00
2022-01-05 16:56:16 +01:00