[oe-commits] sledz : rsyslog: break potential infinite loop in actionDoRetry

git version control git at git.openembedded.org
Tue Aug 3 06:03:53 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 4946a4b375b9a8243db4f9d4b27bc5820f2e0395
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=4946a4b375b9a8243db4f9d4b27bc5820f2e0395

Author: sledz <sledz at ba11ecae-741b-462f-8724-1218f99f5906>
Date:   Fri Jul 30 15:55:39 2010 +0000

rsyslog: break potential infinite loop in actionDoRetry

If a module always returns RS_RET_OK (like ompipe does) the actionDoRetry
loop may not have leaved faked ACT_STATE_SUSP state in case iResumeOKinRow
had ever reached a count of 1000.

Signed-off-by: Steffen Sledz <sledz at dresearch.de>

---

 recipes/rsyslog/files/rsyslog-resume.patch |   29 ++++++++++++++++++++++++++++
 recipes/rsyslog/rsyslog_5.5.4.bb           |    4 ++-
 2 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/recipes/rsyslog/files/rsyslog-resume.patch b/recipes/rsyslog/files/rsyslog-resume.patch
new file mode 100644
index 0000000..73ed101
--- /dev/null
+++ b/recipes/rsyslog/files/rsyslog-resume.patch
@@ -0,0 +1,29 @@
+From 467f10a13950b4b8d5a9fff7f14c20874777a4ba Mon Sep 17 00:00:00 2001
+From: Steffen Sledz <sledz at dresearch.de>
+Date: Fri, 30 Jul 2010 14:39:53 +0200
+Subject: [PATCH] break potential infinite loop in actionDoRetry
+
+If a module always returns RS_RET_OK (like ompipe does) the actionDoRetry
+loop may not have leaved faked ACT_STATE_SUSP state in case iResumeOKinRow
+had ever reached a count of 1000.
+
+Signed-off-by: Steffen Sledz <sledz at dresearch.de>
+---
+ action.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/action.c b/action.c
+index 32a07dc..90ec1bf 100644
+--- a/action.c
++++ b/action.c
+@@ -508,6 +508,7 @@ static rsRetVal actionDoRetry(action_t *pThis, time_t ttNow)
+ 		iRet = pThis->pMod->tryResume(pThis->pModData);
+ 		if((pThis->iResumeOKinRow > 999) && (pThis->iResumeOKinRow % 1000 == 0)) {
+ 			bTreatOKasSusp = 1;
++			pThis->iResumeOKinRow = 0;
+ 		} else {
+ 			bTreatOKasSusp = 0;
+ 		}
+-- 
+1.6.4.2
+
diff --git a/recipes/rsyslog/rsyslog_5.5.4.bb b/recipes/rsyslog/rsyslog_5.5.4.bb
index 7a3eb5d..e949ed5 100644
--- a/recipes/rsyslog/rsyslog_5.5.4.bb
+++ b/recipes/rsyslog/rsyslog_5.5.4.bb
@@ -1,5 +1,7 @@
 require rsyslog.inc
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
+
+SRC_URI += " file://rsyslog-resume.patch "
 
 SRC_URI[md5sum] = "824df2504955df1619e5ec2915d783aa"
 SRC_URI[sha256sum] = "31853a551ea7ca960c59c9e33406b1748bdf311059c9d8a4ce98816d51b17cac"





More information about the Openembedded-commits mailing list