linux-stable/drivers/isdn
Yang Yingliang 7f1cda9c19 mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
[ Upstream commit 1232946cf5 ]

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 handle_dmsg()
and hfcm_l1callback(), kfree_skb() is called in them, 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: af69fb3a8f ("Add mISDN HFC multiport driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-07 12:07:29 +01:00
..
capi isdn: cpai: check ctr->cnr to avoid array index out of bound 2021-10-27 09:34:00 +02:00
divert
gigaset staging: gigaset: add endpoint-type sanity check 2019-12-21 10:41:50 +01:00
hardware mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave() 2023-01-07 12:07:29 +01:00
hisax isdn: hisax: hfc_pci: Fix a possible concurrency use-after-free bug in HFCPCI_l1hw() 2019-02-12 19:44:58 +01:00
hysdn treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
i4l isdn: isdn_tty: fix build warning of strncpy 2019-03-13 14:04:52 -07:00
isdnloop
mISDN mISDN: fix misuse of put_device() in mISDN_register_device() 2022-11-25 17:35:39 +01:00
Kconfig
Makefile