Re: [syzbot] [bluetooth?] WARNING in l2cap_do_send (2)

From: Hillf Danton
Date: Thu Dec 28 2023 - 06:39:48 EST


On Tue, 26 Dec 2023 14:54:27 -0800
> HEAD commit: fbafc3e621c3 Merge tag 'for_linus' of git://git.kernel.org..
> git tree: upstream
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14125c81e80000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

--- x/net/bluetooth/hci_core.c
+++ y/net/bluetooth/hci_core.c
@@ -3235,9 +3235,12 @@ void hci_send_acl(struct hci_chan *chan,

BT_DBG("%s chan %p flags 0x%4.4x", hdev->name, chan, flags);

+ if (!mutex_trylock(&hdev->req_lock))
+ return;
hci_queue_acl(chan, &chan->data_q, skb, flags);

queue_work(hdev->workqueue, &hdev->tx_work);
+ mutex_unlock(&hdev->req_lock);
}

/* Send SCO data */
--