diff options
author | Jinjie Ruan <ruanjinjie@huawei.com> | 2023-08-23 11:46:37 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-13 09:42:34 +0200 |
commit | a33ae132eec218fa6588e932ec48209b4c410680 (patch) | |
tree | 3584e40c112ffaa0e07a6bf1d8fc9a486d162c8f /drivers/bluetooth | |
parent | 7e7197e4d6a1bc72a774590d8765909f898be1dc (diff) | |
download | linux-stable-a33ae132eec218fa6588e932ec48209b4c410680.tar.gz linux-stable-a33ae132eec218fa6588e932ec48209b4c410680.tar.bz2 linux-stable-a33ae132eec218fa6588e932ec48209b4c410680.zip |
Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave()
[ Upstream commit 2a05334d7f91ff189692089c05fc48cc1d8204de ]
It is not allowed to call kfree_skb() from hardware interrupt
context or with hardware interrupts being disabled.
So replace kfree_skb() with dev_kfree_skb_irq() under
spin_lock_irqsave(). Compile tested only.
Fixes: baac6276c0a9 ("Bluetooth: btusb: handle mSBC audio over USB Endpoints")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/btusb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index d6f405763c56..f2062c2a28da 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -1984,7 +1984,7 @@ static int btusb_switch_alt_setting(struct hci_dev *hdev, int new_alts) * alternate setting. */ spin_lock_irqsave(&data->rxlock, flags); - kfree_skb(data->sco_skb); + dev_kfree_skb_irq(data->sco_skb); data->sco_skb = NULL; spin_unlock_irqrestore(&data->rxlock, flags); |