Bluetooth: ISO: don't try to remove CIG if there are bound CIS left
authorPauli Virtanen <pav@iki.fi>
Thu, 1 Jun 2023 06:34:44 +0000 (09:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2023 09:15:18 +0000 (11:15 +0200)
commit66b3f7425a9c5ebc2174539a55ba4ccf4cf1272c
treee4f3c7dd7d729d63ffd1d79517a677b90cc35947
parent9c7e51b94709f6aaf24a32bd267e75e89f3a0b2c
Bluetooth: ISO: don't try to remove CIG if there are bound CIS left

[ Upstream commit 6c242c64a09e78349fb0a5f0a6f8076a3d7c0bb4 ]

Consider existing BOUND & CONNECT state CIS to block CIG removal.
Otherwise, under suitable timing conditions we may attempt to remove CIG
while Create CIS is pending, which fails.

Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_conn.c