2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Fix a race between isc__nm_async_shutdown() and new sends/reads

There was a data race where a new event could be scheduled after
isc__nm_async_shutdown() had cleaned up all the dangling UDP/TCP
sockets from the loop.
This commit is contained in:
Ondřej Surý
2020-10-27 20:00:08 +01:00
committed by Ondřej Surý
parent 5fcd52209a
commit 6cfadf9db0
4 changed files with 247 additions and 91 deletions

View File

@@ -471,7 +471,7 @@ struct isc_nmsocket {
atomic_bool connecting;
atomic_bool connected;
atomic_bool connect_error;
atomic_bool reading;
bool accepting;
isc_refcount_t references;
/*%
@@ -719,7 +719,7 @@ isc__nm_udp_send(isc_nmhandle_t *handle, isc_region_t *region, isc_nm_cb_t cb,
* Back-end implementation of isc_nm_send() for UDP handles.
*/
isc_result_t
void
isc__nm_udp_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb, void *cbarg);
/*
* Back-end implementation of isc_nm_read() for UDP handles.