Repository navigation
[PW_SID:1180235] BAP transport Release and reacquire fixes - #2629
BluezTestBot wants to merge 3 commits into
Conversation
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
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 29 |
| Duplication | -2 |
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.
|
CheckPatch |
|
GitLint |
|
BuildEll |
|
BluezMake |
|
MakeCheck |
|
MakeDistcheck |
|
CheckValgrind |
|
CheckSmatch |
|
bluezmakeextell |
|
TestFunctional |
|
IncrementalBuild |
|
ScanBuild |
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(-)