Blob Blame History Raw
From: Lihong Yang <lihong.yang@intel.com>
Date: Tue, 28 Aug 2018 10:16:08 -0700
Subject: i40evf: cancel workqueue sync for adminq when a VF is removed
Patch-mainline: v4.20-rc1
Git-commit: babbcc60040abfb7a9e3caa1c58fe182ae73762a
References: bsc#1111981 FATE#326312 FATE#326313

If a VF is being removed, there is no need to continue with the
workqueue sync for the adminq task, thus cancel it. Without this call,
when VFs are created and removed right away, there might be a chance for
the driver to crash with events stuck in the adminq.

Signed-off-by: Lihong Yang <lihong.yang@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -3907,6 +3907,8 @@ static void i40evf_remove(struct pci_dev
 	if (adapter->watchdog_timer.function)
 		del_timer_sync(&adapter->watchdog_timer);
 
+	cancel_work_sync(&adapter->adminq_task);
+
 	i40evf_free_rss(adapter);
 
 	if (hw->aq.asq.count)