Message ID | 20221207093239.3775457-3-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mISDN: don't call dev_kfree_skb() under spin_lock_irqsave() | expand |
Wed, Dec 07, 2022 at 10:32:38AM CET, yangyingliang@huawei.com wrote: >It is not allowed to call consume_skb() from hardware interrupt context >or with interrupts being disabled. So replace dev_kfree_skb() with >dev_consume_skb_irq() under spin_lock_irqsave(). > >Fixes: 1700fe1a10dc ("Add mISDN HFC PCI driver") >Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index e964a8dd8512..84b8806b4a8f 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -1621,12 +1621,12 @@ hfcpci_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb) Write_hfc(hc, HFCPCI_STATES, 0x40); skb_queue_purge(&dch->squeue); if (dch->tx_skb) { - dev_kfree_skb(dch->tx_skb); + dev_consume_skb_irq(dch->tx_skb); dch->tx_skb = NULL; } dch->tx_idx = 0; if (dch->rx_skb) { - dev_kfree_skb(dch->rx_skb); + dev_consume_skb_irq(dch->rx_skb); dch->rx_skb = NULL; } test_and_clear_bit(FLG_TX_BUSY, &dch->Flags);
It is not allowed to call consume_skb() from hardware interrupt context or with interrupts being disabled. So replace dev_kfree_skb() with dev_consume_skb_irq() under spin_lock_irqsave(). Fixes: 1700fe1a10dc ("Add mISDN HFC PCI driver") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/isdn/hardware/mISDN/hfcpci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)