diff options
author | Thomas Falcon <tlfalcon@linux.ibm.com> | 2020-06-12 13:34:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-12 14:11:02 -0700 |
commit | 6954a9e4192b86d778fb52b525fd7b62d51b1147 (patch) | |
tree | 04e207acaa83877fb444ce03c97f031d81c9cc82 /drivers/net/ethernet/ibm | |
parent | b65ce380b754e77fbfdcfc83fd6e29c8ceedf431 (diff) | |
download | linux-6954a9e4192b86d778fb52b525fd7b62d51b1147.tar.bz2 |
ibmvnic: Flush existing work items before device removal
Ensure that all scheduled work items have completed before continuing
with device removal and after further event scheduling has been
halted. This patch fixes a bug where a scheduled driver reset event
is processed following device removal.
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 197dc5b2c090..1b4d04e4474b 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -5184,6 +5184,9 @@ static int ibmvnic_remove(struct vio_dev *dev) adapter->state = VNIC_REMOVING; spin_unlock_irqrestore(&adapter->state_lock, flags); + flush_work(&adapter->ibmvnic_reset); + flush_delayed_work(&adapter->ibmvnic_delayed_reset); + rtnl_lock(); unregister_netdevice(netdev); |