net/tap: fix file close on remove
authorYunjian Wang <wangyunjian@huawei.com>
Thu, 16 Apr 2020 03:04:45 +0000 (11:04 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:08 +0000 (13:57 +0200)
commitf9d5da4ab686b331c55bb98f43237d64ab820d0b
tree4bc9e06b936902cd99a2ce524b68cc4f65be781e
parentcc6cf04f59ec20757990b3e8586b7c3a7f497720
net/tap: fix file close on remove

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>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/tap/rte_eth_tap.c