lock disp->mgr before reading disp->mgr->buffers

This commit is contained in:
Mark Andrews 2019-11-22 11:55:47 +11:00
parent 545e1391fa
commit afc7389ce8

View file

@ -1045,9 +1045,11 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
mgr = disp->mgr;
qid = mgr->qid;
LOCK(&disp->mgr->buffer_lock);
dispatch_log(disp, LVL(90),
"got packet: requests %d, buffers %d, recvs %d",
disp->requests, disp->mgr->buffers, disp->recv_pending);
UNLOCK(&disp->mgr->buffer_lock);
if (dispsock == NULL && ev->ev_type == ISC_SOCKEVENT_RECVDONE) {
/*