From 76aef84a7dede56bd0d55a0aa541275cd59391da Mon Sep 17 00:00:00 2001 From: pdns packagers Date: Mon, 12 Oct 2020 13:42:43 +0100 Subject: [PATCH] CVE-2019-10163-4.1.8-busyloop Gbp-Pq: Name CVE-2019-10163-4.1.8-busyloop.patch --- pdns/communicator.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pdns/communicator.cc b/pdns/communicator.cc index 7db5a3e..7fd59e4 100644 --- a/pdns/communicator.cc +++ b/pdns/communicator.cc @@ -136,7 +136,10 @@ void CommunicatorClass::mainloop(void) if (extraSlaveRefresh) slaveRefresh(&P); } - else { + else { + // eat up extra posts to avoid busy looping if many posts were done + while (d_any_sem.tryWait() == 0) { + } break; // something happened } // this gets executed at least once every second -- 2.30.2