bind/bind-9.11-rh1736762-2.patch
Petr Menšík 1a4de8b956 Backport a few upstream thread safety fixes
It might not fix all issues, but was detected by upstream using
automated tool. Should not break anything new, but might fix issue
triggered usually on ppc64le platform.
2019-12-02 20:34:08 +01:00

39 lines
1006 B
Diff

From 8e1900b79d854e22ec6b5cea152ff363ce9a461c Mon Sep 17 00:00:00 2001
From: Mark Andrews <marka@isc.org>
Date: Fri, 22 Nov 2019 21:48:12 +0000
Subject: [PATCH 2/4] Merge branch
'1334-threadsanitizer-data-race-dispatch-c-1339-in-tcp_recv-v9_11' into
'v9_11'
lock dispatch before reporting state
See merge request isc-projects/bind9!2619
(cherry picked from commit e36730076af3190fe5930a6406dd414b87e1e178)
---
lib/dns/dispatch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c
index ea5cf102f2..94df6bab9a 100644
--- a/lib/dns/dispatch.c
+++ b/lib/dns/dispatch.c
@@ -1353,12 +1353,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;
--
2.21.0