From: Mark Andrews Date: Thu, 21 Nov 2019 23:49:40 +0000 (+1100) Subject: lock dispatch before reporting state X-Git-Tag: v9.14.9~26^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=e99156043f6cf16410dd7d4fd58cc186f91687b1;p=thirdparty%2Fbind9.git lock dispatch before reporting state (cherry picked from commit 3075445ed6c1160d2f033ac53aecd451f77666fc) --- diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index d090649b052..a2b78b24f87 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -1338,12 +1338,12 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) { qid = disp->qid; + LOCK(&disp->lock); + dispatch_log(disp, LVL(90), "got TCP packet: requests %d, buffers %d, recvs %d", disp->requests, disp->tcpbuffers, disp->recv_pending); - LOCK(&disp->lock); - INSIST(disp->recv_pending != 0); disp->recv_pending = 0;