]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: hci_conn: Fix connection cleanup with BIG with 2 or more BIS
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 22 Oct 2025 20:29:41 +0000 (16:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:36:41 +0000 (15:36 -0500)
[ Upstream commit 857eb0fabc389be5159e0e17d84bc122614b5b98 ]

This fixes bis_cleanup not considering connections in BT_OPEN state
before attempting to remove the BIG causing the following error:

btproxy[20110]: < HCI Command: LE Terminate Broadcast Isochronous Group (0x08|0x006a) plen 2
        BIG Handle: 0x01
        Reason: Connection Terminated By Local Host (0x16)
> HCI Event: Command Status (0x0f) plen 4
      LE Terminate Broadcast Isochronous Group (0x08|0x006a) ncmd 1
        Status: Unknown Advertising Identifier (0x42)

Fixes: fa224d0c094a ("Bluetooth: ISO: Reassociate a socket with an active BIS")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_conn.c

index e524bb59bff2349065694835b7d853506e42380d..63ae62fe20bbc5494376f784b999e6e4dacc2593 100644 (file)
@@ -843,6 +843,13 @@ static void bis_cleanup(struct hci_conn *conn)
                if (bis)
                        return;
 
+               bis = hci_conn_hash_lookup_big_state(hdev,
+                                                    conn->iso_qos.bcast.big,
+                                                    BT_OPEN,
+                                                    HCI_ROLE_MASTER);
+               if (bis)
+                       return;
+
                hci_le_terminate_big(hdev, conn);
        } else {
                hci_le_big_terminate(hdev, conn->iso_qos.bcast.big,