Re: [PATCH 6.12 597/602] Bluetooth: hci_conn: Fix running bis_cleanup for hci_conn->type PA_LINK
Harshit Mogalapalli <[email protected]> Sun, 2 Aug 2026 00:30:20 +0530
| Newsgroups | dev.linux.lists.patches,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
Hi Greg, On 30/07/26 7:46 pm, Greg Kroah-Hartman wrote: > 6.12-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Luiz Augusto von Dentz <[email protected]> > > commit d36349ea73d805bb72cbc24ab90cb1da4ad5c379 upstream. > > Connections with type of PA_LINK shall be considered temporary just to > track the lifetime of PA Sync setup, once the BIG Sync is established > and connection are created with BIS_LINK the existing PA_LINK > connection shall not longer use bis_cleanup otherwise it terminates the > PA Sync when that shall be left to BIS_LINK connection to do it. > > Fixes: a7bcffc673de ("Bluetooth: Add PA_LINK to distinguish BIG sync and PA sync connections") > Signed-off-by: Luiz Augusto von Dentz <[email protected]> > Signed-off-by: Greg Kroah-Hartman <[email protected]> > --- > net/bluetooth/hci_conn.c | 10 +++++++++- > net/bluetooth/hci_event.c | 7 ++++++- > 2 files changed, 15 insertions(+), 2 deletions(-) > > --- a/net/bluetooth/hci_conn.c > +++ b/net/bluetooth/hci_conn.c > @@ -830,7 +830,15 @@ static void bis_cleanup(struct hci_conn > /* Check if ISO connection is a BIS and terminate advertising > * set and BIG if there are no other connections using it. > */ > - bis = hci_conn_hash_lookup_big(hdev, conn->iso_qos.bcast.big); > + bis = hci_conn_hash_lookup_big_state(hdev, > + conn->iso_qos.bcast.big, > + BT_CONNECTED); > + if (bis) > + return; > + > + bis = hci_conn_hash_lookup_big_state(hdev, > + conn->iso_qos.bcast.big, > + BT_CONNECT); > if (bis) > return; I have run an AI assisted backport review and it spotted an issue. I have taken a look, and the two BIG-state lookups lost an upstream role restriction. Upstream d36349ea73d8 has: hci_conn_hash_lookup_big_state(hdev, big, BT_CONNECTED, HCI_ROLE_MASTER); and the same HCI_ROLE_MASTER restriction for BT_CONNECT. The 6.12.y backport calls the older three-argument helper: hci_conn_hash_lookup_big_state(hdev, big, BT_CONNECTED); That helper accepts either role. The 6.12 tree also creates slave-role BIS connections during BIG Sync establishment, so a slave BIS with the same BIG handle and state can satisfy this lookup and suppress cleanup of the unrelated master BIG. I think 6.12.y misses commit b2a5f2e1c127 ("Bluetooth: hci_event: Add support for handling LE BIG Sync Lost event"), which adds the role-aware helper and updates its callers, so we might want to apply this as well and then reapply this ? thanks, Harshit> --- a/net/bluetooth/hci_event.c > +++ b/net/bluetooth/hci_event.c > @@ -7026,9 +7026,14 @@ static void hci_le_big_sync_established_ > continue; > } > > - if (ev->status != 0x42) > + if (ev->status != 0x42) { > /* Mark PA sync as established */ > set_bit(HCI_CONN_PA_SYNC, &bis->flags); > + /* Reset cleanup callback of PA Sync so it doesn't > + * terminate the sync when deleting the connection. > + */ > + conn->cleanup = NULL; > + } > > bis->sync_handle = conn->sync_handle; > bis->iso_qos.bcast.big = ev->handle; > > >