From: Yunjian Wang Date: Wed, 8 May 2019 12:51:38 +0000 (+0800) Subject: net/ixgbe: fix unexpected link handler X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=03bb633aa86232df29a0692b2727cff3e4e1b685;p=dpdk.git net/ixgbe: fix unexpected link handler The nic's interrupt source has some active handler, which maybe call ixgbe_dev_link_update() to set link handler. We should cancel the link handler before remove dev to prevent executing the link handler. It triggers segfault. Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Wei Zhao --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 975fa474ce..2470c89cf0 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1344,6 +1344,9 @@ eth_ixgbe_dev_uninit(struct rte_eth_dev *eth_dev) /* cancel the delay handler before remove dev */ rte_eal_alarm_cancel(ixgbe_dev_interrupt_delayed_handler, eth_dev); + /* cancel the link handler before remove dev */ + rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, eth_dev); + /* uninitialize PF if max_vfs not zero */ ixgbe_pf_host_uninit(eth_dev);