patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH v5 4/5] net/tap: fix close a valid fd
@ 2020-04-16  3:04 wangyunjian
  0 siblings, 0 replies; only message in thread
From: wangyunjian @ 2020-04-16  3:04 UTC (permalink / raw)
  To: dev, ferruh.yigit
  Cc: keith.wiles, jerry.lilijun, xudingke, Yunjian Wang, stable

From: Yunjian Wang <wangyunjian@huawei.com>

The internal structure is freed and set to NULL in the
rte_eth_dev_release_port() and zero is a valid fd. Ultimately
leads to a valid fd was closed by mistake.

Fixes: 3101191c63ab ("net/tap: fix device removal when no queue exist")
CC: stable@dpdk.org

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/net/tap/rte_eth_tap.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 576055e16..eab1fb771 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2451,10 +2451,6 @@ rte_pmd_tap_remove(struct rte_vdev_device *dev)
 	tap_devices_count--;
 	rte_eth_dev_release_port(eth_dev);
 
-	if (internals->ka_fd != -1) {
-		close(internals->ka_fd);
-		internals->ka_fd = -1;
-	}
 	return 0;
 }
 
-- 
2.19.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-16  3:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16  3:04 [dpdk-stable] [dpdk-dev] [PATCH v5 4/5] net/tap: fix close a valid fd wangyunjian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).