mISDN: hfcpci: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 12 Dec 2022 08:41:38 +0000 (16:41 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 14 Dec 2022 03:24:52 +0000 (19:24 -0800)
commitf0f596bd75a9d573ca9b587abb39cee0b916bb82
treeb797af6e7912e8cbbce188b0da22ed6c913ad81c
parentddc9648db162eee556edd5222d2808fe33730203
mISDN: hfcpci: don't call dev_kfree_skb/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.

skb_queue_purge() is called under spin_lock_irqsave() in hfcpci_l2l1D(),
kfree_skb() is called in it, to fix this, use skb_queue_splice_init()
to move the dch->squeue to a free queue, also enqueue the tx_skb and
rx_skb, at last calling __skb_queue_purge() to free the SKBs afer unlock.

Fixes: 1700fe1a10dc ("Add mISDN HFC PCI driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/isdn/hardware/mISDN/hfcpci.c