net/tap: fix unregistering callback with invalid fd
authorVipin Varghese <vipin.varghese@intel.com>
Mon, 18 Sep 2017 18:47:35 +0000 (19:47 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:49 +0000 (02:49 +0200)
commitd8f759a0ea03f8258db2b8e7fad3c7dffc8a9c39
tree96146d61c7e98172414e81ffa06096ffc735c96a
parent95c7ff0548fd015bcae4b908046d9d44083ed122
net/tap: fix unregistering callback with invalid fd

tap_intr_handle_set() called by tap_dev_start(), and if LSC is disabled
(dev_conf.intr_conf.lsc == 0), it tries to unregister interrupt
callback without checking the interrupt file descriptor.

Fixes: c0bddd3a057f ("net/tap: add link status notification")
Cc: stable@dpdk.org
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
drivers/net/tap/rte_eth_tap.c