]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
lock dispatch before reporting state
authorMark Andrews <marka@isc.org>
Thu, 21 Nov 2019 23:49:40 +0000 (10:49 +1100)
committerMark Andrews <marka@isc.org>
Fri, 22 Nov 2019 21:25:33 +0000 (08:25 +1100)
(cherry picked from commit 3075445ed6c1160d2f033ac53aecd451f77666fc)

lib/dns/dispatch.c

index d090649b052361d852c3f035bf243b358dee68a0..a2b78b24f87d87238d00645aa6000c021b505915 100644 (file)
@@ -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;