Skip to content

Commit 6954a9e

Browse files
tlfalcondavem330
authored andcommitted
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]> Signed-off-by: David S. Miller <[email protected]>
1 parent b65ce38 commit 6954a9e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5184,6 +5184,9 @@ static int ibmvnic_remove(struct vio_dev *dev)
51845184
adapter->state = VNIC_REMOVING;
51855185
spin_unlock_irqrestore(&adapter->state_lock, flags);
51865186

5187+
flush_work(&adapter->ibmvnic_reset);
5188+
flush_delayed_work(&adapter->ibmvnic_delayed_reset);
5189+
51875190
rtnl_lock();
51885191
unregister_netdevice(netdev);
51895192

0 commit comments

Comments
 (0)