Skip to contentSkip to conversation

ibmvnic: Flush existing work items before device removal

PATCH Applied Thomas Falcon 2 participants 2 messages Jun 12, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/net/ethernet/ibm/ibmvnic.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/ibm/ibmvnic.c +3 -0
index 1cb2b7f3b2cb..a66fa75976d3 100644
@@ -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
maintainer Applied
#1 lore raw

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.

Applied, thank you.