Skip to content

Commit 7d8c19b

Browse files
Yang Yingliangkuba-moo
authored andcommitted
net: plip: don't call kfree_skb/dev_kfree_skb() under spin_lock_irq()
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: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5f4d487 commit 7d8c19b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/plip/plip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,12 @@ plip_bh_timeout_error(struct net_device *dev, struct net_local *nl,
450450
}
451451
rcv->state = PLIP_PK_DONE;
452452
if (rcv->skb) {
453-
kfree_skb(rcv->skb);
453+
dev_kfree_skb_irq(rcv->skb);
454454
rcv->skb = NULL;
455455
}
456456
snd->state = PLIP_PK_DONE;
457457
if (snd->skb) {
458-
dev_kfree_skb(snd->skb);
458+
dev_consume_skb_irq(snd->skb);
459459
snd->skb = NULL;
460460
}
461461
spin_unlock_irq(&nl->lock);

0 commit comments

Comments
 (0)