[dpdk-stable] patch 'net/tap: fix file descriptor check' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Fri Nov 23 11:27:10 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.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/29/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.

Kevin Traynor

---
>From e001235f8a80b7b6f404d7317a636a905f8d5264 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
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 <stephen at networkplumber.org>
Acked-by: Keith Wiles <keith.wiles at intel.com>
---
 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 e05c7ba72..745405467 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -232,5 +232,5 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive)
 
 error:
-	if (fd > 0)
+	if (fd >= 0)
 		close(fd);
 	return -1;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.949553581 +0000
+++ 0066-net-tap-fix-file-descriptor-check.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,15 +1,16 @@
-From e0a10f4691c2fa74d228a1c21772456afef1e060 Mon Sep 17 00:00:00 2001
+From e001235f8a80b7b6f404d7317a636a905f8d5264 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen at networkplumber.org>
 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 at dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
 Acked-by: Keith Wiles <keith.wiles at intel.com>
@@ -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 e05c7ba72..745405467 100644
 --- a/drivers/net/tap/rte_eth_tap.c
 +++ b/drivers/net/tap/rte_eth_tap.c
-@@ -249,5 +249,5 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive)
+@@ -232,5 +232,5 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive)
  
  error:
 -	if (fd > 0)


More information about the stable mailing list