summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/lance.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-12-08 17:21:47 +0300
committerDavid S. Miller <davem@davemloft.net>2022-12-12 12:56:17 +0300
commit6151d105dfce8c23edf30eed35e97f3d9b96a35c (patch)
treed1df316f32d72e295953e90db3283b6d71be8e92 /drivers/net/ethernet/amd/lance.c
parent3727f742915f04f6fc550b80cf406999bd4e90d0 (diff)
downloadlinux-6151d105dfce8c23edf30eed35e97f3d9b96a35c.tar.xz
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 <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/lance.c')
-rw-r--r--drivers/net/ethernet/amd/lance.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/lance.c b/drivers/net/ethernet/amd/lance.c
index fb8686214a32..8971665a4b2a 100644
--- a/drivers/net/ethernet/amd/lance.c
+++ b/drivers/net/ethernet/amd/lance.c
@@ -1001,7 +1001,7 @@ static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
skb_copy_from_linear_data(skb, &lp->tx_bounce_buffs[entry], skb->len);
lp->tx_ring[entry].base =
((u32)isa_virt_to_bus((lp->tx_bounce_buffs + entry)) & 0xffffff) | 0x83000000;
- dev_kfree_skb(skb);
+ dev_consume_skb_irq(skb);
} else {
lp->tx_skbuff[entry] = skb;
lp->tx_ring[entry].base = ((u32)isa_virt_to_bus(skb->data) & 0xffffff) | 0x83000000;