summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btusb.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2019-11-28 19:24:27 +0100
committerMarcel Holtmann <marcel@holtmann.org>2019-11-28 19:29:01 +0100
commit22cc6b7a1dbb58da4afc539d9b7d470b23a25eea (patch)
tree3edbad244e1fc9a276febba307fe514f40a4dd2e /drivers/bluetooth/btusb.c
parent3cd9d35ee5f7a23203443f1a0d3c344f034c0dc7 (diff)
downloadlinux-22cc6b7a1dbb58da4afc539d9b7d470b23a25eea.tar.bz2
Bluetooth: btusb: fix non-atomic allocation in completion handler
USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL. Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices") Cc: stable <stable@vger.kernel.org> # 5.3 Cc: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r--drivers/bluetooth/btusb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 82fb2e7b2892..9b587e662b48 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2602,7 +2602,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
* and being processed the events from there then.
*/
if (test_bit(BTUSB_TX_WAIT_VND_EVT, &data->flags)) {
- data->evt_skb = skb_clone(skb, GFP_KERNEL);
+ data->evt_skb = skb_clone(skb, GFP_ATOMIC);
if (!data->evt_skb)
goto err_out;
}