Bluetooth: hci_conn: Fix modifying handle while aborting
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 3 Aug 2023 21:49:14 +0000 (14:49 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 11 Aug 2023 18:54:10 +0000 (11:54 -0700)
commit16e3b6429159795a87add7584eb100b19aa1d70b
treea21948d486bf532bb9b4ce78d44ebb8db37eb6df
parentb7f923b1ef6a2e76013089d30c9552257056360a
Bluetooth: hci_conn: Fix modifying handle while aborting

This introduces hci_conn_set_handle which takes care of verifying the
conditions where the hci_conn handle can be modified, including when
hci_conn_abort has been called and also checks that the handles is
valid as well.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c