Skip to content

Commit 39c1eb6

Browse files
Yang YingliangVudentz
authored andcommitted
Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave()
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: 9238f36 ("Bluetooth: Add request cmd_complete and cmd_status functions") Signed-off-by: Yang Yingliang <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 7b503e3 commit 39c1eb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/hci_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3985,7 +3985,7 @@ void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status,
39853985
*req_complete_skb = bt_cb(skb)->hci.req_complete_skb;
39863986
else
39873987
*req_complete = bt_cb(skb)->hci.req_complete;
3988-
kfree_skb(skb);
3988+
dev_kfree_skb_irq(skb);
39893989
}
39903990
spin_unlock_irqrestore(&hdev->cmd_q.lock, flags);
39913991
}

0 commit comments

Comments
 (0)