File 0001-Fixed-race-in-asyncWriter.patch of Package rsyslog.15978
From 7e88634f3dc0fb059d4f16b217b4b1502521c3a3 Mon Sep 17 00:00:00 2001
From: Radovan Sroka <rsroka@redhat.com>
Date: Tue, 26 Jun 2018 12:50:02 +0200
Subject: [PATCH] Fixed race in asyncWriter
strmFlushInternal needs to be called with locked mutex
---
runtime/stream.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/runtime/stream.c b/runtime/stream.c
index f93b4042e..d84dd3642 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -1499,10 +1499,8 @@ asyncWriterThread(void *pPtr)
}
if(bTimedOut && pThis->iBufPtr > 0) {
/* if we timed out, we need to flush pending data */
- d_pthread_mutex_unlock(&pThis->mut);
strmFlushInternal(pThis, 1);
bTimedOut = 0;
- d_pthread_mutex_lock(&pThis->mut);
continue;
}
bTimedOut = 0;
--
2.26.2