* [PATCH BlueZ v1 2/4] monitor: Fix crash parsing notification
2024-07-31 13:57 [PATCH BlueZ v1 1/4] client/player: Fix not setting config target_latency with edpoint.config Luiz Augusto von Dentz
@ 2024-07-31 13:57 ` Luiz Augusto von Dentz
2024-07-31 13:57 ` [PATCH BlueZ v1 3/4] shared/bap: Fix not setting metadata Luiz Augusto von Dentz
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2024-07-31 13:57 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This fixes the following crash caused by notify callback being NULL:
Jump to the invalid address stated on the next line
at 0x0: ???
by 0x1E8375: print_notify (att.c:5420)
by 0x1E9464: att_multiple_vl_rsp (att.c:5463)
by 0x20D39E: att_packet (att.c:5637)
by 0x1B2054: l2cap_frame (l2cap.c:2567)
by 0x1B4A4D: l2cap_packet (l2cap.c:2708)
by 0x19AD43: packet_hci_acldata (packet.c:12522)
by 0x19CF07: packet_monitor (packet.c:4249)
by 0x152405: data_callback (control.c:973)
by 0x2204F6: mainloop_run (mainloop.c:106)
by 0x221017: mainloop_run_with_signal (mainloop-notify.c:189)
by 0x14F387: main (main.c:298)
Address 0x0 is not stack'd, malloc'd or (recently) free'd
---
monitor/att.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/monitor/att.c b/monitor/att.c
index a23347ef7..73a616584 100644
--- a/monitor/att.c
+++ b/monitor/att.c
@@ -4646,7 +4646,8 @@ static void print_notify(const struct l2cap_frame *frame, uint16_t handle,
frame = &clone;
}
- handler->notify(frame);
+ if (handler->notify)
+ handler->notify(frame);
}
static void att_handle_value_notify(const struct l2cap_frame *frame)
--
2.45.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH BlueZ v1 3/4] shared/bap: Fix not setting metadata
2024-07-31 13:57 [PATCH BlueZ v1 1/4] client/player: Fix not setting config target_latency with edpoint.config Luiz Augusto von Dentz
2024-07-31 13:57 ` [PATCH BlueZ v1 2/4] monitor: Fix crash parsing notification Luiz Augusto von Dentz
@ 2024-07-31 13:57 ` Luiz Augusto von Dentz
2024-07-31 13:57 ` [PATCH BlueZ v1 4/4] bap: Fix not setting metatada Luiz Augusto von Dentz
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2024-07-31 13:57 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
bt_bap_stream_metatada shall not send Update Metadata if the states
don't allow it, instead it shall store it so it can be send later when
enabling the stream.
---
src/shared/bap.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 499e740c9..a7217b417 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -1971,8 +1971,17 @@ static unsigned int bap_ucast_metadata(struct bt_bap_stream *stream,
return 0;
}
- return bap_stream_metadata(stream, BT_ASCS_METADATA, data, func,
- user_data);
+ switch (bt_bap_stream_get_state(stream)) {
+ /* Valid only if ASE_State field = 0x03 (Enabling) */
+ case BT_BAP_STREAM_STATE_ENABLING:
+ /* or 0x04 (Streaming) */
+ case BT_BAP_STREAM_STATE_STREAMING:
+ return bap_stream_metadata(stream, BT_ASCS_METADATA, data, func,
+ user_data);
+ }
+
+ stream_metadata(stream, data, NULL);
+ return 0;
}
static uint8_t stream_release(struct bt_bap_stream *stream, struct iovec *rsp)
--
2.45.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH BlueZ v1 4/4] bap: Fix not setting metatada
2024-07-31 13:57 [PATCH BlueZ v1 1/4] client/player: Fix not setting config target_latency with edpoint.config Luiz Augusto von Dentz
2024-07-31 13:57 ` [PATCH BlueZ v1 2/4] monitor: Fix crash parsing notification Luiz Augusto von Dentz
2024-07-31 13:57 ` [PATCH BlueZ v1 3/4] shared/bap: Fix not setting metadata Luiz Augusto von Dentz
@ 2024-07-31 13:57 ` Luiz Augusto von Dentz
2024-07-31 16:58 ` [BlueZ,v1,1/4] client/player: Fix not setting config target_latency with edpoint.config bluez.test.bot
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2024-07-31 13:57 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fix not using bt_bap_stream_metadata when configuring a new stream as
the endpoint/client may have set it.
---
profiles/audio/bap.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 53f430d66..a2c5a546d 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1523,6 +1523,10 @@ static void setup_config(void *data, void *user_data)
return;
}
+ if (setup->metadata && setup->metadata->iov_len)
+ bt_bap_stream_metadata(setup->stream, setup->metadata, NULL,
+ NULL);
+
bt_bap_stream_set_user_data(setup->stream, ep->path);
}
--
2.45.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* RE: [BlueZ,v1,1/4] client/player: Fix not setting config target_latency with edpoint.config
2024-07-31 13:57 [PATCH BlueZ v1 1/4] client/player: Fix not setting config target_latency with edpoint.config Luiz Augusto von Dentz
` (2 preceding siblings ...)
2024-07-31 13:57 ` [PATCH BlueZ v1 4/4] bap: Fix not setting metatada Luiz Augusto von Dentz
@ 2024-07-31 16:58 ` bluez.test.bot
2024-07-31 17:10 ` [PATCH BlueZ v1 1/4] " patchwork-bot+bluetooth
2024-08-01 9:30 ` patchwork-bot+bluetooth
5 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2024-07-31 16:58 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 2318 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=875511
---Test result---
Test Summary:
CheckPatch PASS 1.87 seconds
GitLint FAIL 4.72 seconds
BuildEll PASS 25.15 seconds
BluezMake PASS 1690.11 seconds
MakeCheck PASS 13.56 seconds
MakeDistcheck PASS 177.39 seconds
CheckValgrind PASS 251.75 seconds
CheckSmatch WARNING 352.40 seconds
bluezmakeextell PASS 119.37 seconds
IncrementalBuild PASS 6230.29 seconds
ScanBuild PASS 981.65 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1,1/4] client/player: Fix not setting config target_latency with edpoint.config
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (87>80): "[BlueZ,v1,1/4] client/player: Fix not setting config target_latency with edpoint.config"
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/att.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.src/shared/bap.c:288: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:288: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:288:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structures
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH BlueZ v1 1/4] client/player: Fix not setting config target_latency with edpoint.config
2024-07-31 13:57 [PATCH BlueZ v1 1/4] client/player: Fix not setting config target_latency with edpoint.config Luiz Augusto von Dentz
` (3 preceding siblings ...)
2024-07-31 16:58 ` [BlueZ,v1,1/4] client/player: Fix not setting config target_latency with edpoint.config bluez.test.bot
@ 2024-07-31 17:10 ` patchwork-bot+bluetooth
2024-08-01 9:30 ` patchwork-bot+bluetooth
5 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+bluetooth @ 2024-07-31 17:10 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Wed, 31 Jul 2024 14:57:15 +0100 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This fixes not setting target_latency with endpoint.config command.
> ---
> client/player.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Here is the summary with links:
- [BlueZ,v1,1/4] client/player: Fix not setting config target_latency with edpoint.config
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=549d38852f66
- [BlueZ,v1,2/4] monitor: Fix crash parsing notification
(no matching commit)
- [BlueZ,v1,3/4] shared/bap: Fix not setting metadata
(no matching commit)
- [BlueZ,v1,4/4] bap: Fix not setting metatada
(no matching commit)
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] 7+ messages in thread* Re: [PATCH BlueZ v1 1/4] client/player: Fix not setting config target_latency with edpoint.config
2024-07-31 13:57 [PATCH BlueZ v1 1/4] client/player: Fix not setting config target_latency with edpoint.config Luiz Augusto von Dentz
` (4 preceding siblings ...)
2024-07-31 17:10 ` [PATCH BlueZ v1 1/4] " patchwork-bot+bluetooth
@ 2024-08-01 9:30 ` patchwork-bot+bluetooth
5 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+bluetooth @ 2024-08-01 9:30 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Wed, 31 Jul 2024 14:57:15 +0100 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This fixes not setting target_latency with endpoint.config command.
> ---
> client/player.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Here is the summary with links:
- [BlueZ,v1,1/4] client/player: Fix not setting config target_latency with edpoint.config
(no matching commit)
- [BlueZ,v1,2/4] monitor: Fix crash parsing notification
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=8a708aa5f046
- [BlueZ,v1,3/4] shared/bap: Fix not setting metadata
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=fe703a0058d8
- [BlueZ,v1,4/4] bap: Fix not setting metatada
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=998104507ba1
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] 7+ messages in thread