net/tap: fix queues fd check before close
authorYunjian Wang <wangyunjian@huawei.com>
Fri, 17 Apr 2020 12:03:57 +0000 (20:03 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:09 +0000 (13:57 +0200)
commit13b698d11feca4ab12237303d553dc4e89d8a8d6
tree28cbd38db53a547260b42cdce93cdc005a7fcfd5
parentf6d1379f5516402bf7d6dcbf918ef030533d821d
net/tap: fix queues fd check before close

The fd is possibly a negative value while it is passed as an
argument to function "close". Fix the check to the fd.

Fixes: ed8132e7c912 ("net/tap: move fds of queues to be in process private")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/tap/rte_eth_tap.c
drivers/net/tap/tap_intr.c