ibmvnic: Flush existing work items before device removal
PATCH 1/1 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 <[email protected]>
--- drivers/net/ethernet/ibm/ibmvnic.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/ibm/ibmvnic.c +3 -0
@@ -5197,6 +5197,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);
Signature · 1 line
2.18.1
From: Thomas Falcon <[email protected]>
Date: Fri, 12 Jun 2020 13:34:41 -0500
Quoted 6 lines
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 <[email protected]>
Applied, thank you.