]> 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 19:52:14 +0000 (19:52 +0000)
lib/dns/dispatch.c

index a3e28f3e12d38e366da11ef4c06014db9fab62ed..4a77b7fe457e1c69a726c04060243d3a85f4b0c7 100644 (file)
@@ -1334,12 +1334,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;