mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
[master] fix dispatch.c shutdown race
4952. [bug] A race condition on shutdown could trigger an assertion failure in dispatch.c. [RT #43822]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
4952. [bug] A race condition on shutdown could trigger an
|
||||||
|
assertion failure in dispatch.c. [RT #43822]
|
||||||
|
|
||||||
4591. [port] Addressed some python 3 compatibility issues.
|
4591. [port] Addressed some python 3 compatibility issues.
|
||||||
Thanks to Ville Skytta. [RT #44955] [RT #44956]
|
Thanks to Ville Skytta. [RT #44955] [RT #44956]
|
||||||
|
|
||||||
|
@@ -3721,9 +3721,12 @@ dns_dispatch_importrecv(dns_dispatch_t *disp, isc_event_t *event) {
|
|||||||
REQUIRE((disp->attributes & DNS_DISPATCHATTR_NOLISTEN) != 0);
|
REQUIRE((disp->attributes & DNS_DISPATCHATTR_NOLISTEN) != 0);
|
||||||
REQUIRE(event != NULL);
|
REQUIRE(event != NULL);
|
||||||
|
|
||||||
sevent = (isc_socketevent_t *)event;
|
if ((disp->attributes & DNS_DISPATCHATTR_NOLISTEN) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
sevent = (isc_socketevent_t *)event;
|
||||||
INSIST(sevent->n <= disp->mgr->buffersize);
|
INSIST(sevent->n <= disp->mgr->buffersize);
|
||||||
|
|
||||||
newsevent = (isc_socketevent_t *)
|
newsevent = (isc_socketevent_t *)
|
||||||
isc_event_allocate(disp->mgr->mctx, NULL,
|
isc_event_allocate(disp->mgr->mctx, NULL,
|
||||||
DNS_EVENT_IMPORTRECVDONE, udp_shrecv,
|
DNS_EVENT_IMPORTRECVDONE, udp_shrecv,
|
||||||
|
@@ -533,6 +533,9 @@ dns_dispatch_importrecv(dns_dispatch_t *disp, isc_event_t *event);
|
|||||||
* shared between dispatchers and clients. If the dispatcher fails to copy
|
* shared between dispatchers and clients. If the dispatcher fails to copy
|
||||||
* or send the event, nothing happens.
|
* or send the event, nothing happens.
|
||||||
*
|
*
|
||||||
|
* If the attribute DNS_DISPATCHATTR_NOLISTEN is not set, then
|
||||||
|
* the dispatch is already handling a recv; return immediately.
|
||||||
|
*
|
||||||
* Requires:
|
* Requires:
|
||||||
*\li disp is valid, and the attribute DNS_DISPATCHATTR_NOLISTEN is set.
|
*\li disp is valid, and the attribute DNS_DISPATCHATTR_NOLISTEN is set.
|
||||||
* event != NULL
|
* event != NULL
|
||||||
|
Reference in New Issue
Block a user