* [PATCH BlueZ] shared/bap: check lpac type in bap_bcast_stream_new()
@ 2025-06-08 20:31 Pauli Virtanen
2025-06-08 21:56 ` [BlueZ] " bluez.test.bot
2025-06-09 15:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2025-06-08 20:31 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pauli Virtanen
bap_bcast_stream_new() shall refuse to create streams if lpac is not of
broadcast type.
---
Notes:
I ran across an unreproducible crash, where during connection dropping a
crash occurred IIRC due to stream->rpac == NULL, as if bt_bap_stream_new()
had produced a bcast stream for unicast lpac.
Not sure if it is actually possible that bt_bap_stream_new() is called
from unicast setup when bt_bap_get_att(bap) == false (via
gatt_client_ready callback?), but it's probably better to check the lpac
type here regardless.
src/shared/bap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index f0c6f6485..854855f6b 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -6155,6 +6155,8 @@ static struct bt_bap_stream *bap_bcast_stream_new(struct bt_bap *bap,
ep = queue_find(bap->remote_eps, find_ep_source, NULL);
if (!ep)
return NULL;
+ } else if (lpac->type != BT_BAP_BCAST_SINK) {
+ return NULL;
}
if (!stream)
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] shared/bap: check lpac type in bap_bcast_stream_new()
2025-06-08 20:31 [PATCH BlueZ] shared/bap: check lpac type in bap_bcast_stream_new() Pauli Virtanen
@ 2025-06-08 21:56 ` bluez.test.bot
2025-06-09 15:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-06-08 21:56 UTC (permalink / raw)
To: linux-bluetooth, pav
[-- Attachment #1: Type: text/plain, Size: 1864 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=969619
---Test result---
Test Summary:
CheckPatch PENDING 0.27 seconds
GitLint PENDING 0.34 seconds
BuildEll PASS 19.99 seconds
BluezMake PASS 2621.48 seconds
MakeCheck PASS 19.98 seconds
MakeDistcheck PASS 200.23 seconds
CheckValgrind PASS 279.64 seconds
CheckSmatch WARNING 305.70 seconds
bluezmakeextell PASS 128.05 seconds
IncrementalBuild PENDING 0.32 seconds
ScanBuild PASS 911.25 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/shared/bap.c:315:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:315:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:315:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] shared/bap: check lpac type in bap_bcast_stream_new()
2025-06-08 20:31 [PATCH BlueZ] shared/bap: check lpac type in bap_bcast_stream_new() Pauli Virtanen
2025-06-08 21:56 ` [BlueZ] " bluez.test.bot
@ 2025-06-09 15:40 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-06-09 15:40 UTC (permalink / raw)
To: Pauli Virtanen; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Sun, 8 Jun 2025 23:31:03 +0300 you wrote:
> bap_bcast_stream_new() shall refuse to create streams if lpac is not of
> broadcast type.
> ---
>
> Notes:
> I ran across an unreproducible crash, where during connection dropping a
> crash occurred IIRC due to stream->rpac == NULL, as if bt_bap_stream_new()
> had produced a bcast stream for unicast lpac.
>
> [...]
Here is the summary with links:
- [BlueZ] shared/bap: check lpac type in bap_bcast_stream_new()
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=45734349087e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-09 15:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-08 20:31 [PATCH BlueZ] shared/bap: check lpac type in bap_bcast_stream_new() Pauli Virtanen
2025-06-08 21:56 ` [BlueZ] " bluez.test.bot
2025-06-09 15:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox