From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id CC7711B518 for ; Fri, 30 Nov 2018 00:15:25 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:21:18 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW8f032075; Fri, 30 Nov 2018 01:15:23 +0200 From: Yongseok Koh To: Stephen Hemminger Cc: Keith Wiles , dpdk stable Date: Thu, 29 Nov 2018 15:11:35 -0800 Message-Id: <20181129231202.30436-101-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/tap: fix file descriptor check' has been queued to LTS release 17.11.5 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: Thu, 29 Nov 2018 23:15:26 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From 428973bd5398209c43f69ac956f4239a43db2239 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 6 Nov 2018 11:30:05 -0800 Subject: [PATCH] net/tap: fix file descriptor check [ upstream commit e0a10f4691c2fa74d228a1c21772456afef1e060 ] Static analysis tools don't like the fact that fd could be zero in the error path. This won't happen in real world because stdin would have to be closed, then other error occurring. Coverity issue: 14079 Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") Signed-off-by: Stephen Hemminger Acked-by: Keith Wiles --- drivers/net/tap/rte_eth_tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index c38c02ef1..466624ae6 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -222,7 +222,7 @@ tun_alloc(struct pmd_internals *pmd) return fd; error: - if (fd > 0) + if (fd >= 0) close(fd); return -1; } -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:49.627649044 -0800 +++ 0101-net-tap-fix-file-descriptor-check.patch 2018-11-29 15:01:45.266958000 -0800 @@ -1,15 +1,16 @@ -From e0a10f4691c2fa74d228a1c21772456afef1e060 Mon Sep 17 00:00:00 2001 +From 428973bd5398209c43f69ac956f4239a43db2239 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 6 Nov 2018 11:30:05 -0800 Subject: [PATCH] net/tap: fix file descriptor check +[ upstream commit e0a10f4691c2fa74d228a1c21772456afef1e060 ] + Static analysis tools don't like the fact that fd could be zero in the error path. This won't happen in real world because stdin would have to be closed, then other error occurring. Coverity issue: 14079 Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") -Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Keith Wiles @@ -18,10 +19,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c -index e7817e896..75b82f2b3 100644 +index c38c02ef1..466624ae6 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c -@@ -248,7 +248,7 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive) +@@ -222,7 +222,7 @@ tun_alloc(struct pmd_internals *pmd) return fd; error: