Skip to contentSkip to conversation

e1000: flush work queues on remove

PATCH New John W. Linville 1 participant 1 message Mar 21, 2005

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

PATCH 1/1 e1000: flush work queues on remove

Flush work queues in ->remove() for e1000.

---
Since e1000 is using work queues, we need to call flush_scheduled_work() before removing the driver from memory. Otherwise, we are prone to an Oops...

 drivers/net/e1000/e1000_main.c |    2 ++
 1 files changed, 2 insertions(+)
drivers/net/e1000/e1000_main.c renamed from drivers/net/e1000/e1000_main.c.orig +2 -0
@@ -660,6 +660,8 @@ e1000_remove(struct pci_dev *pdev)
 	struct e1000_adapter *adapter = netdev->priv;
 	uint32_t manc;
 
+	flush_scheduled_work();
+
 	if(adapter->hw.mac_type >= e1000_82540 &&
 	   adapter->hw.media_type == e1000_media_type_copper) {
 		manc = E1000_READ_REG(&adapter->hw, MANC);
Signature · 2 lines
John W. Linville
[email protected]