Skip to content

[PW_SID:1180235] BAP transport Release and reacquire fixes - #2629

Closed
BluezTestBot wants to merge 3 commits into
masterfrom
1180235
Closed

BluezTestBot wants to merge 3 commits into
masterfrom
1180235

Conversation

@BluezTestBot

Copy link
Copy Markdown

From: Derek Tern 1263187-dt@users.noreply.gitlab.freedesktop.org

A late stream-ready event can reach bap_resume_complete() after Release
has queued Disable. It then replies to Release with an Acquire payload
and drops the Disable request ID. Client disconnection can subsequently
free the owner while the Disable callback still refers to it.

Only complete pending Acquire/TryAcquire requests from this path. Leave
Release and its request ID for the Disable callback or cancellation.

Fixes: 466fce0 ("transport: handle BAP Enabling state correctly when resuming")
Assisted-by: Codex:GPT-6

profiles/audio/transport.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Derek Tern added 3 commits October 6, 2026 15:38
A late stream-ready event can reach bap_resume_complete() after Release
has queued Disable. It then replies to Release with an Acquire payload
and drops the Disable request ID. Client disconnection can subsequently
free the owner while the Disable callback still refers to it.

Only complete pending Acquire/TryAcquire requests from this path. Leave
Release and its request ID for the Disable callback or cancellation.

Fixes: 466fce0 ("transport: handle BAP Enabling state correctly when resuming")
Assisted-by: Codex:GPT-6
When reacquiring a transport, the stream can reach Enabling before its
previous CIS finishes disconnecting. Once teardown completes, IO
recreation accepts only QoS, while CIS enabling requires existing IO.
The pending Acquire consequently stalls.

Allow deferred IO recreation in Enabling too. Keep the existing CIG-busy
checks and recreate all IO before enabling CISes.

Fixes: 7feff47 ("bap: delay QoS & IO creation if CIG is busy or setups configuring")
Assisted-by: Codex:GPT-6
Acquire both unicast transports, close their sockets and release them
through the same D-Bus owner. Require an empty Release reply so a late
ready callback cannot pass unnoticed by returning an Acquire payload.

Wait for both Acquire replies before Release, and for both Release
replies before the next Acquire. Only requests on different transport
paths are concurrent; no path has successive operations queued without
waiting for its preceding reply.

Repeat three times with immediate, 100 ms and one-second reacquisition.
Check Acquire reply types and active transport states. Close returned
FDs even when a reply is malformed.

Assisted-by: Codex:GPT-6
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 29 complexity · -2 duplication

Metric Results
Complexity 29
Duplication -2

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@BluezTestBot

Copy link
Copy Markdown
Author

CheckPatch
Desc: Run checkpatch.pl script
Duration: 1.23 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

GitLint
Desc: Run gitlint
Duration: 1.21 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

BuildEll
Desc: Build and Install ELL
Duration: 19.40 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

BluezMake
Desc: Build BlueZ
Duration: 392.20 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

MakeCheck
Desc: Run Bluez Make Check
Duration: 14.09 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

MakeDistcheck
Desc: Run Bluez Make Distcheck
Duration: 138.44 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

CheckValgrind
Desc: Run Bluez Make Check with Valgrind
Duration: 229.50 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

CheckSmatch
Desc: Run smatch tool with source
Duration: 287.01 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

bluezmakeextell
Desc: Build Bluez with External ELL
Duration: 92.95 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

TestFunctional
Desc: Run test-functional
Duration: 1139.30 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

IncrementalBuild
Desc: Incremental build with the patches in the series
Duration: 397.83 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

ScanBuild
Desc: Run Scan Build
Duration: 1103.29 seconds
Result: PASS

@BluezTestBot
BluezTestBot deleted the 1180235 branch October 7, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant