net/tap: fix unexpected link handler
The nic's interrupt source has some active handler, which maybe call
tap_dev_intr_handler() to set link handler. We should cancel the link
handler before close fd to prevent executing the link handler. It
triggers segfault.
Call Trace:
0x00007f15e08dad99 in __rte_panic (Error adding fd %d epoll_ctl, %s\n")
0x00007f15e08e9b87 in eal_intr_thread_main ()
0x00007f15e249be15 in start_thread ()
0x00007f15d5322f9d in clone ()
Fixes:
c0bddd3a057f ("net/tap: add link status notification")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>