Skip to contentSkip to conversation

e1000: unlock tx_lock before return

PATCH Michael Renzmann 1 participant 1 message Jun 14, 2005 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi all.

Sorry for replying to my own post. I rediffed the patch to make it a -p1 patch as described by DaveM in another (netdev) thread. Also CC'd lkml.

lkml'ers, please CC replies to me, since I'm not subscribed.

Quoted 10 lines · Michael Renzmann

It may happen that the e1000 driver returns from e1000_xmit_frame() while still holding the tx_lock spinlock. This is at least true for the version that comes with kernel 2.4.31. The problem doesn't exist in 2.6.11.12.

The attached patch applies to vanilla 2.4.31. I couldn't test the patch myself (no e1000 available), but it's a trivial patch and thus it's expected to work without problems.

drivers/net/e1000/e1000_main.c +1 -1
@@ -1955,8 +1955,8 @@
 		if(unlikely(e1000_82547_fifo_workaround(adapter, skb))) {
 			netif_stop_queue(netdev);
 			mod_timer(&adapter->tx_fifo_stall_timer, jiffies);
-			return 1;
 			spin_unlock_irqrestore(&adapter->tx_lock, flags);
+			return 1;
 		}
 	}