]> git.itanic.dy.fi Git - linux-stable/commit
Bluetooth: hci_sync: delete CIS in BT_OPEN/CONNECT/BOUND when aborting
authorPauli Virtanen <pav@iki.fi>
Wed, 26 Jul 2023 21:25:25 +0000 (00:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 10:16:20 +0000 (12:16 +0200)
commit3b9e2e14ba36230cf2b934d11fcc91f90fd49275
tree5b16c4cb7e41f57401eb682b8ce72b5b8d0a363b
parent8f3a578a9feff546936d385021381d38201eb6e9
Bluetooth: hci_sync: delete CIS in BT_OPEN/CONNECT/BOUND when aborting

[ Upstream commit 2889bdd0a9a195533c2103e7b39ab0de844d72f6 ]

Dropped CIS that are in state BT_OPEN/BT_BOUND, and in state BT_CONNECT
with HCI_CONN_CREATE_CIS unset, should be cleaned up immediately.
Closing CIS ISO sockets should result to the hci_conn be deleted, so
that potentially pending CIG removal can run.

hci_abort_conn cannot refer to them by handle, since their handle is
still unset if Set CIG Parameters has not yet completed.

This fixes CIS not being terminated if the socket is shut down
immediately after connection, so that the hci_abort_conn runs before Set
CIG Parameters completes. See new BlueZ test "ISO Connect Close - Success"

Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Stable-dep-of: a239110ee8e0 ("Bluetooth: hci_sync: always check if connection is alive before deleting")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_sync.c