]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
i40evf: cancel workqueue sync for adminq when a VF is removed
authorLihong Yang <lihong.yang@intel.com>
Tue, 28 Aug 2018 17:16:08 +0000 (10:16 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:59 +0000 (13:16 +0100)
BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit babbcc60040abfb7a9e3caa1c58fe182ae73762a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index 8b32a74dc61670196e7da449457f460e455dde6a..4a37006240382d1dbb2eb4338588e028d46c9301 100644 (file)
@@ -3126,6 +3126,8 @@ static void i40evf_remove(struct pci_dev *pdev)
 
        flush_scheduled_work();
 
+       cancel_work_sync(&adapter->adminq_task);
+
        i40evf_free_rss(adapter);
 
        if (hw->aq.asq.count)