From: wangyunjian <wangyunjian@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <keith.wiles@intel.com>,
<jerry.lilijun@huawei.com>, <xudingke@huawei.com>,
Yunjian Wang <wangyunjian@huawei.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [dpdk-dev] [PATCH v4 4/5] net/tap: fix close a valid fd
Date: Sat, 11 Apr 2020 19:24:29 +0800 [thread overview]
Message-ID: <1586604269-15968-1-git-send-email-wangyunjian@huawei.com> (raw)
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
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 6a77b2a7e..829a9e9b4 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2447,10 +2447,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
next reply other threads:[~2020-04-11 11:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 11:24 wangyunjian [this message]
2020-04-15 15:13 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1586604269-15968-1-git-send-email-wangyunjian@huawei.com \
--to=wangyunjian@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerry.lilijun@huawei.com \
--cc=keith.wiles@intel.com \
--cc=stable@dpdk.org \
--cc=xudingke@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).