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)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 12 Dec 2022 22:19:25 +0000 (14:19 -0800)
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: 166d2f6a4332 ("[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>
drivers/bluetooth/hci_ll.c

index 4eb420a9ed04e4591c2be15368baf88f63c11e1e..5abc01a2acf7219140830732583bdad62650c4ae 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;
        }