]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: hci_event: Fix checking conn for le_conn_complete_evt
authorArchie Pusaka <apusaka@chromium.org>
Tue, 23 Aug 2022 04:39:22 +0000 (12:39 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 25 Aug 2022 23:26:18 +0000 (16:26 -0700)
commit3135c4ac1d4bbb47ea51a0456bd2889586b2efbc
treebbe4ec39b50570a6ef385c89e300c67508485250
parent42b4de40619b34794da800617ee56f3ed2b19955
Bluetooth: hci_event: Fix checking conn for le_conn_complete_evt

To prevent multiple conn complete events, we shouldn't look up the
conn with hci_lookup_le_connect, since it requires the state to be
BT_CONNECT. By the time the duplicate event is processed, the state
might have changed, so we end up processing the new event anyway.

Change the lookup function to hci_conn_hash_lookup_ba.

Fixes: 911b983bc55ca ("Bluetooth: hci_event: Ignore multiple conn complete events")
Signed-off-by: Archie Pusaka <apusaka@chromium.org>
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_event.c