浏览代码

e1000: fix spinlock bug

This patch fixes an obvious and nasty bug where we could exit the transmit
routine while holding tx_lock.

Signed-off-by:  Mitch Williams <mitch.a.williams@intel.com>
Mitch Williams 20 年之前
父节点
当前提交
b2b3d82479
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/e1000/e1000_main.c

+ 1 - 0
drivers/net/e1000/e1000_main.c

@@ -2307,6 +2307,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 	tso = e1000_tso(adapter, skb);
 	if (tso < 0) {
 		dev_kfree_skb_any(skb);
+		spin_unlock_irqrestore(&adapter->tx_lock, flags);
 		return NETDEV_TX_OK;
 	}