]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Bluetooth: hci_ll: don't call kfree_skb() under spin_lock_irqsave()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 7 Dec 2022 02:18:31 +0000 (10:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:16 +0000 (11:41 +0100)
[ Upstream commit 8f458f783dfbb19c1f1cb58ed06eeb701f52091b ]

It is not allowed to call kfree_skb() from hardware interrupt
context or with interrupts being disabled. So replace kfree_skb()
with dev_kfree_skb_irq() under spin_lock_irqsave().

Fixes: 9a465d291061 ("[Bluetooth] Add UART driver for Texas Instruments' BRF63xx chips")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/hci_ll.c

index d9a4c6c691e071251e49d9c8ce650647a6e71c5b..aeb3e670c4f52f72b2a46922d00201e66f199b64 100644 (file)
@@ -345,7 +345,7 @@ static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb)
        default:
                BT_ERR("illegal hcill state: %ld (losing packet)",
                       ll->hcill_state);
-               kfree_skb(skb);
+               dev_kfree_skb_irq(skb);
                break;
        }