From ca7131cb6d2bd594d8575001b80e73098948589b Mon Sep 17 00:00:00 2001 From: pdns packagers Date: Fri, 21 Jun 2019 20:07:07 +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