From 03bb633aa86232df29a0692b2727cff3e4e1b685 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Wed, 8 May 2019 20:51:38 +0800 Subject: [PATCH] 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 --- drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.20.1