Linux bluetooth development
 help / color / mirror / Atom feed
From: Simon Mikuda <simon.mikuda@streamunlimited.com>
To: linux-bluetooth@vger.kernel.org
Cc: Simon Mikuda <simon.mikuda@streamunlimited.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Subject: [PATCH 1/3] Bluetooth: hci_conn: Fix BIG cleanup while BISes are still bound
Date: Sun, 22 Nov 2026 21:13:48 +0100	[thread overview]
Message-ID: <20261122201351.2854661-1-simon.mikuda@streamunlimited.com> (raw)

If a BIS bound to a BIG closes before LE BIG Complete, bis_cleanup() sees
no other BIS in use and terminates the BIG. That removes the advertising
set the BIG is being created on, and a Broadcom/Infineon controller
crashes: it sends vendor events with a memory dump and answers no further
command.

    < LE Create Broadcast Isochronous Group
    > LE Broadcast Isochronous Group Complete  Status: Success
    < LE Set Periodic Advertising Enable  Disabled
    < LE Setup Isochronous Data Path
    < LE Set Extended Advertising Enable  Disabled
    < LE Remove Advertising Set
    < LE Terminate Broadcast Isochronous Group

hci_le_create_big_complete_evt() connects every BIS in BT_BOUND, so count
them as users of the BIG too. They were counted until the lookup of any
BIS of the BIG was replaced with lookups by state.

Fixes: d36349ea73d8 ("Bluetooth: hci_conn: Fix running bis_cleanup for hci_conn->type PA_LINK")
Signed-off-by: Simon Mikuda <simon.mikuda@streamunlimited.com>
---
 net/bluetooth/hci_conn.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 7f0250653189..8024fc4223e9 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -927,6 +927,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_BOUND,
+						     HCI_ROLE_MASTER);
+		if (bis)
+			return;
+
 		hci_le_terminate_big(hdev, conn);
 	} else {
 		hci_le_big_terminate(hdev, conn);

base-commit: cf357cfc025e7f72851479ed3fb60d5f16413c1b
-- 
2.43.0


             reply	other threads:[~2026-11-22 20:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 20:13 Simon Mikuda [this message]
2026-11-22 20:13 ` [PATCH 2/3] Bluetooth: hci_conn: Terminate a BIG before its periodic advertising Simon Mikuda
2026-11-22 20:13 ` [PATCH 3/3] Bluetooth: hci_sync: Fix closing all BISes while their BIG is created Simon Mikuda
2026-11-22 22:55 ` [1/3] Bluetooth: hci_conn: Fix BIG cleanup while BISes are still bound bluez.test.bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261122201351.2854661-1-simon.mikuda@streamunlimited.com \
    --to=simon.mikuda@streamunlimited.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox