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>
This commit is contained in:
parent
b65ce380b7
commit
6954a9e419
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue