Message ID | 20221205150928.4017973-3-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Bluetooth: don't call kfree_skb() under spin_lock_irqsave() | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c index 4eb420a9ed04..5f8a267fd8a5 100644 --- a/drivers/bluetooth/hci_ll.c +++ b/drivers/bluetooth/hci_ll.c @@ -345,8 +345,9 @@ static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb) default: BT_ERR("illegal hcill state: %ld (losing packet)", ll->hcill_state); + spin_unlock_irqrestore(&ll->hcill_lock, flags); kfree_skb(skb); - break; + return 0; } spin_unlock_irqrestore(&ll->hcill_lock, flags);
It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. Call it after the spin_unlock_irqrestore(). Fixes: 166d2f6a4332 ("[Bluetooth] Add UART driver for Texas Instruments' BRF63xx chips") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/bluetooth/hci_ll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)