From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id B62EE235 for ; Tue, 21 Nov 2017 14:25:11 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6B09020A5F; Tue, 21 Nov 2017 08:25:11 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:25:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=CFHAMBud2YD3O5THu CSvxt/b+kjh1ILEmz1XGtE6yhk=; b=RUz9HwMMGGrwi3iLUOwFzMuYD7UBtjIVN Lmtl29Ean8GDMWWJYk76u+xNWu4a/zpn/j95UfSU9QhwdZGyTApAotzWuwcbMqfN gPddqXKY6mbuiPj60BnTLllpqKvEtaWChFYnpxuThOO83T5fcfDE/ZA5D34/r4Wd NsRfes2o5LTjSFiA2ELXJxulehNtLnldeD66kwCIX9ECX/utGMj14iq4+TQRJmlo 4kxbcfPw2ue85UhEJ+ion3WdZ5udmsbc3QjQHxQIUPm/BkYw98qX5mpgH1nljdpI qBE+ptRsAPXbhNSI/ikqFsx3xaqyY8F0CeM4tDtmpbEOC5SFDf7Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=CFHAMBud2YD3O5THuCSvxt/b+kjh1ILEmz1XGtE6yhk=; b=PxMSo7ls /qo8BQla49ok0HcZbn00kIAGFJ9v7YLG/HhbT6VyGdJyovKHIU6zQftsQrabPUGL 8yfi0ucZ5fSHWNKC1WkSUXon1wZhKieK5lnAOZWXKj8fZIO7G7Csi0rB6NSkIUGp aaom+SRySOQ8yHxamaXIxFClFVyl+bBzbx/EH1GoaBvYWwOCduTYdI45S8J9oFgA Y3wsXYkOXi+b3LxY4mB7429IW4MZmVkhZ/5qx8H2jFmtgnaURRZVaIMFPsofZAZT Wwom5JrETGf1WKK6nzKPLI3s6CfxJkWjoqeB636zeyyp6Og7nTRdV+67UP+joXCX KaHSwI/G+luQYA== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 04DDC2486C; Tue, 21 Nov 2017 08:25:08 -0500 (EST) From: Yuanhan Liu To: Kuba Kozak Cc: Yuanhan Liu , dpdk stable Date: Tue, 21 Nov 2017 21:17:13 +0800 Message-Id: <1511270333-31002-91-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'vhost: check poll error code' has been queued to stable release 17.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2017 13:25:11 -0000 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 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 Acked-by: Yuanhan Liu --- 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