[dpdk-stable] patch 'vhost: check poll error code' has been queued to stable release 17.08.1

Yuanhan Liu yliu at fridaylinux.org
Tue Nov 21 14:17:13 CET 2017


Hi,

FYI, your patch has been queued to stable release 17.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f9ab15bf230e9d196c3f296094498ac12ce0f1ec Mon Sep 17 00:00:00 2001
From: Kuba Kozak <kubax.kozak at intel.com>
Date: Fri, 22 Sep 2017 14:17:40 +0200
Subject: [PATCH] vhost: check poll error code

[ upstream commit 66a62101240bb714a6d2d5acd39010675251ffec ]

Add return value check for poll() call.

Coverity issue: 140740
Fixes: 59317cef249c ("vhost: allow many vhost-user ports")

Signed-off-by: Kuba Kozak <kubax.kozak at intel.com>
Acked-by: Yuanhan Liu <yliu at fridaylinux.org>
---
 lib/librte_vhost/fd_man.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/fd_man.c b/lib/librte_vhost/fd_man.c
index 2ceacc9..4c6fed4 100644
--- a/lib/librte_vhost/fd_man.c
+++ b/lib/librte_vhost/fd_man.c
@@ -222,6 +222,7 @@ fdset_event_dispatch(void *arg)
 	int remove1, remove2;
 	int need_shrink;
 	struct fdset *pfdset = arg;
+	int val;
 
 	if (pfdset == NULL)
 		return NULL;
@@ -239,7 +240,9 @@ fdset_event_dispatch(void *arg)
 		numfds = pfdset->num;
 		pthread_mutex_unlock(&pfdset->fd_mutex);
 
-		poll(pfdset->rwfds, numfds, 1000 /* millisecs */);
+		val = poll(pfdset->rwfds, numfds, 1000 /* millisecs */);
+		if (val < 0)
+			continue;
 
 		need_shrink = 0;
 		for (i = 0; i < numfds; i++) {
-- 
2.7.4



More information about the stable mailing list