]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Bluetooth: hci_core: Rate limit the logging of invalid SCO handle
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Jan 2022 19:15:37 +0000 (11:15 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 25 Jan 2022 21:40:31 +0000 (22:40 +0100)
The invalid SCO handle error is normally caused by a race in the USB
transport where the data and event happen to be 2 different endpoints
so the event carrying the SCO handle is processed after its data.

Note: This can probably be resolved with use of force_poll_sync
debugfs.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_core.c

index 14c2da9d33ff47ce3b75c5e899304815c62270d1..5bde0ec411771e7337993d1c234cfb980d3c745e 100644 (file)
@@ -3667,8 +3667,8 @@ static void hci_scodata_packet(struct hci_dev *hdev, struct sk_buff *skb)
                sco_recv_scodata(conn, skb);
                return;
        } else {
-               bt_dev_err(hdev, "SCO packet for unknown connection handle %d",
-                          handle);
+               bt_dev_err_ratelimited(hdev, "SCO packet for unknown connection handle %d",
+                                      handle);
        }
 
        kfree_skb(skb);