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
..
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-11-30 12:20:22 +02:00
2021-11-22 11:09:21 +01:00
2021-07-06 05:33:48 +00:00
2021-10-06 11:22:20 +02:00
2021-12-02 14:18:41 +01:00
2021-10-15 04:31:37 +00:00
2021-10-15 01:01:25 -07:00
2021-10-14 10:33:24 +02:00
2021-12-02 14:18:41 +01:00
2021-10-06 11:22:20 +02:00
2021-12-08 10:22:03 -08:00
2021-10-13 05:47:48 +02:00
2021-10-06 11:22:20 +02:00
2021-10-12 15:01:53 +02:00
2021-10-12 09:56:44 +11: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-28 07:39:37 +00: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-25 21:33:35 +00:00
2021-10-13 00:49:15 -07:00
2021-06-09 14:35:14 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-12-17 20:28:01 +11: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-13 05:47:48 +02:00
2021-10-28 07:38:56 +00:00
2021-10-12 13:11:13 -07:00
2021-10-06 11:22:20 +02:00
2021-12-15 21:25:00 +01:00
2021-10-14 10:33:24 +02:00
2021-10-06 11:22:20 +02:00
2021-12-02 14:18:42 +01:00
2021-10-06 11:22:20 +02:00
2021-10-28 07:39:37 +00:00
2021-10-28 07:39:37 +00:00
2021-10-28 07:39:37 +00:00
2021-11-01 21:50:47 +00:00
2021-11-23 08:44:47 +11:00
2021-10-28 07:39:37 +00:00
2021-11-03 20:10:34 +11:00
2021-12-23 15:13:46 +11:00
2021-12-14 15:03:56 +01:00
2021-12-02 14:24:37 +01:00
2021-10-13 00:49:15 -07:00
2021-10-06 11:22:20 +02:00
2021-10-13 05:47:48 +02:00
2021-10-13 00:49:15 -07:00
2021-10-14 10:33:24 +02:00
2021-10-06 11:22:20 +02:00
2021-10-15 01:01:25 -07:00
2021-12-23 15:13:46 +11:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-12-02 14:18:41 +01:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-12-02 14:18:41 +01:00
2021-12-02 14:18:41 +01:00
2021-06-09 14:35:14 +02:00
2021-10-15 11:18:41 +11:00
2021-08-24 09:07:15 +02:00
2021-10-06 11:22:20 +02:00
2021-10-06 11:22:20 +02:00
2021-12-29 10:25:15 +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
2022-01-05 16:56:16 +01:00
2021-12-29 10:25:15 +02:00
2021-10-13 00:49:15 -07:00
2022-01-05 10:27:55 +01:00
2021-10-06 11:22:20 +02:00
2022-01-05 16:56:16 +01:00