Commit 70d67000 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dmfe: don't free skb with local interrupts disabled

dev_kfree_skb() can end up calling local_bh_enable() which goes BUG if local
interrupts are disabled.  Apparently it can deadlock.

So move the skb freeing outside the lock in the dmfe driver.  It will
decrease the lock hold time as well.
parent cb970405
......@@ -668,13 +668,13 @@ static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev)
if ( db->tx_queue_cnt < TX_FREE_DESC_CNT )
netif_wake_queue(dev);
/* free this SKB */
dev_kfree_skb(skb);
/* Restore CR7 to enable interrupt */
spin_unlock_irqrestore(&db->lock, flags);
outl(db->cr7_data, dev->base_addr + DCR7);
/* free this SKB */
dev_kfree_skb(skb);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment