Message ID | 20210721101710.82974-1-desmondcheongzx@gmail.com |
---|---|
State | New |
Headers | show |
Series | Bluetooth: skip invalid hci_sync_conn_complete_evt | expand |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 016b2999f219..091a92338492 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -4373,6 +4373,8 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev, switch (ev->status) { case 0x00: + if (conn->state == BT_CONNECTED) + goto unlock; /* Already connected, event not valid */ conn->handle = __le16_to_cpu(ev->handle); conn->state = BT_CONNECTED; conn->type = ev->link_type;