mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-09 19:39:56 +00:00
net: plip: don't call kfree_skb/dev_kfree_skb() under spin_lock_irq()
[ Upstream commit7d8c19bfc8] It is not allowed to call kfree_skb() or consume_skb() from hardware interrupt context or with interrupts being disabled. So replace kfree_skb/dev_kfree_skb() with dev_kfree_skb_irq() and dev_consume_skb_irq() under spin_lock_irq(). Fixes:1da177e4c3("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/20221207015310.2984909-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a722652f64
commit
f430a34aa9
@@ -450,12 +450,12 @@ plip_bh_timeout_error(struct net_device *dev, struct net_local *nl,
|
|||||||
}
|
}
|
||||||
rcv->state = PLIP_PK_DONE;
|
rcv->state = PLIP_PK_DONE;
|
||||||
if (rcv->skb) {
|
if (rcv->skb) {
|
||||||
kfree_skb(rcv->skb);
|
dev_kfree_skb_irq(rcv->skb);
|
||||||
rcv->skb = NULL;
|
rcv->skb = NULL;
|
||||||
}
|
}
|
||||||
snd->state = PLIP_PK_DONE;
|
snd->state = PLIP_PK_DONE;
|
||||||
if (snd->skb) {
|
if (snd->skb) {
|
||||||
dev_kfree_skb(snd->skb);
|
dev_consume_skb_irq(snd->skb);
|
||||||
snd->skb = NULL;
|
snd->skb = NULL;
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&nl->lock);
|
spin_unlock_irq(&nl->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user