diff options
| author | Yang Yingliang <[email protected]> | 2022-12-08 14:21:47 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-12-12 09:56:17 +0000 |
| commit | 6151d105dfce8c23edf30eed35e97f3d9b96a35c (patch) | |
| tree | d1df316f32d72e295953e90db3283b6d71be8e92 /drivers/net/ethernet/amd/atarilance.c | |
| parent | hamradio: don't call dev_kfree_skb() under spin_lock_irqsave() (diff) | |
| download | kernel-6151d105dfce8c23edf30eed35e97f3d9b96a35c.tar.gz kernel-6151d105dfce8c23edf30eed35e97f3d9b96a35c.zip | |
net: amd: lance: don't call dev_kfree_skb() under spin_lock_irqsave()
It is not allowed to call kfree_skb() or consume_skb() from hardware
interrupt context or with hardware interrupts being disabled.
It should use dev_kfree_skb_irq() or dev_consume_skb_irq() instead.
The difference between them is free reason, dev_kfree_skb_irq() means
the SKB is dropped in error and dev_consume_skb_irq() means the SKB
is consumed in normal.
In these two cases, dev_kfree_skb() is called consume the xmited SKB,
so replace it with dev_consume_skb_irq().
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/amd/atarilance.c')
| -rw-r--r-- | drivers/net/ethernet/amd/atarilance.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c index 3222c48ce6ae..ec704222925d 100644 --- a/drivers/net/ethernet/amd/atarilance.c +++ b/drivers/net/ethernet/amd/atarilance.c @@ -824,7 +824,7 @@ lance_start_xmit(struct sk_buff *skb, struct net_device *dev) lp->memcpy_f( PKTBUF_ADDR(head), (void *)skb->data, skb->len ); head->flag = TMD1_OWN_CHIP | TMD1_ENP | TMD1_STP; dev->stats.tx_bytes += skb->len; - dev_kfree_skb( skb ); + dev_consume_skb_irq(skb); lp->cur_tx++; while( lp->cur_tx >= TX_RING_SIZE && lp->dirty_tx >= TX_RING_SIZE ) { lp->cur_tx -= TX_RING_SIZE; |
