All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/1] bap: Fix setting adapter address type for unicast
@ 2024-03-25 13:19 Vlad Pruteanu
  2024-03-25 13:19 ` [PATCH BlueZ 1/1] " Vlad Pruteanu
  2024-03-25 19:40 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 4+ messages in thread
From: Vlad Pruteanu @ 2024-03-25 13:19 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: mihai-octavian.urzica, silviu.barbulescu, iulia.tanasescu,
	andrei.istodorescu, luiz.dentz, Vlad Pruteanu

This fixes the settin of the adapter address type for unciast
scenario. Currently the address type is searched in data->adapter
however, this pointer is null and leads to the crash listed at the
end of this message. Instead, the address type should be taken from
the adapter variable, which is initialised using device_get_adapter
at the beggining of the function.

==321444==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000016
(pc 0x5601d284e03e bp 0x000000000016 sp 0x7ffdb164b740 T0)
==321444==The signal is caused by a READ memory access.
==321444==Hint: address points to the zero page.
0 0x5601d284e03e in btd_adapter_get_address_type src/adapter.c:545
1 0x5601d27a3f78 in setup_connect_io profiles/audio/bap.c:1860
2 0x5601d27a3f78 in setup_create_ucast_io profiles/audio/bap.c:2053
3 0x5601d27a3f78 in setup_create_io profiles/audio/bap.c:2106
4 0x5601d27a57cd in bap_state profiles/audio/bap.c:2143
5 0x5601d29d30df in bap_stream_state_changed src/shared/bap.c:1250
6 0x5601d29d71e2 in bap_ep_set_status src/shared/bap.c:4395
7 0x5601d293d592 in queue_foreach src/shared/queue.c:207
8 0x5601d2975c84 in notify_cb src/shared/gatt-client.c:2257
9 0x5601d2964217 in handle_notify src/shared/att.c:1012
10 0x5601d2964217 in can_read_data src/shared/att.c:1096

Vlad Pruteanu (1):
  bap: Fix setting adapter address type for unicast

 profiles/audio/bap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH BlueZ 1/1] bap: Fix setting adapter address type for unicast
  2024-03-25 13:19 [PATCH BlueZ 0/1] bap: Fix setting adapter address type for unicast Vlad Pruteanu
@ 2024-03-25 13:19 ` Vlad Pruteanu
  2024-03-25 15:03   ` bluez.test.bot
  2024-03-25 19:40 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
  1 sibling, 1 reply; 4+ messages in thread
From: Vlad Pruteanu @ 2024-03-25 13:19 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: mihai-octavian.urzica, silviu.barbulescu, iulia.tanasescu,
	andrei.istodorescu, luiz.dentz, Vlad Pruteanu

This fixes the settin of the adapter address type for unciast
scenario. Currently the address type is searched in data->adapter
however, this pointer is null and leads to the crash listed at the
end of this message. Instead, the address type should be taken from
the adapter variable, which is initialised using device_get_adapter
at the beggining of the function.

==321444==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000016
(pc 0x5601d284e03e bp 0x000000000016 sp 0x7ffdb164b740 T0)
==321444==The signal is caused by a READ memory access.
==321444==Hint: address points to the zero page.
0 0x5601d284e03e in btd_adapter_get_address_type src/adapter.c:545
1 0x5601d27a3f78 in setup_connect_io profiles/audio/bap.c:1860
2 0x5601d27a3f78 in setup_create_ucast_io profiles/audio/bap.c:2053
3 0x5601d27a3f78 in setup_create_io profiles/audio/bap.c:2106
4 0x5601d27a57cd in bap_state profiles/audio/bap.c:2143
5 0x5601d29d30df in bap_stream_state_changed src/shared/bap.c:1250
6 0x5601d29d71e2 in bap_ep_set_status src/shared/bap.c:4395
7 0x5601d293d592 in queue_foreach src/shared/queue.c:207
8 0x5601d2975c84 in notify_cb src/shared/gatt-client.c:2257
9 0x5601d2964217 in handle_notify src/shared/att.c:1012
10 0x5601d2964217 in can_read_data src/shared/att.c:1096
---
 profiles/audio/bap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 315eff729..030aa6ffe 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1857,7 +1857,7 @@ static void setup_connect_io(struct bap_data *data, struct bap_setup *setup,
 				BT_IO_OPT_SOURCE_BDADDR,
 				btd_adapter_get_address(adapter),
 				BT_IO_OPT_SOURCE_TYPE,
-				btd_adapter_get_address_type(data->adapter),
+				btd_adapter_get_address_type(adapter),
 				BT_IO_OPT_DEST_BDADDR,
 				device_get_address(data->device),
 				BT_IO_OPT_DEST_TYPE,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: bap: Fix setting adapter address type for unicast
  2024-03-25 13:19 ` [PATCH BlueZ 1/1] " Vlad Pruteanu
@ 2024-03-25 15:03   ` bluez.test.bot
  0 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2024-03-25 15:03 UTC (permalink / raw)
  To: linux-bluetooth, vlad.pruteanu

[-- Attachment #1: Type: text/plain, Size: 949 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=837881

---Test result---

Test Summary:
CheckPatch                    PASS      0.30 seconds
GitLint                       PASS      0.22 seconds
BuildEll                      PASS      24.44 seconds
BluezMake                     PASS      1734.50 seconds
MakeCheck                     PASS      13.28 seconds
MakeDistcheck                 PASS      174.87 seconds
CheckValgrind                 PASS      244.47 seconds
CheckSmatch                   PASS      350.29 seconds
bluezmakeextell               PASS      120.25 seconds
IncrementalBuild              PASS      1517.35 seconds
ScanBuild                     PASS      1005.29 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH BlueZ 0/1] bap: Fix setting adapter address type for unicast
  2024-03-25 13:19 [PATCH BlueZ 0/1] bap: Fix setting adapter address type for unicast Vlad Pruteanu
  2024-03-25 13:19 ` [PATCH BlueZ 1/1] " Vlad Pruteanu
@ 2024-03-25 19:40 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2024-03-25 19:40 UTC (permalink / raw)
  To: Vlad Pruteanu
  Cc: linux-bluetooth, mihai-octavian.urzica, silviu.barbulescu,
	iulia.tanasescu, andrei.istodorescu, luiz.dentz

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 25 Mar 2024 15:19:09 +0200 you wrote:
> This fixes the settin of the adapter address type for unciast
> scenario. Currently the address type is searched in data->adapter
> however, this pointer is null and leads to the crash listed at the
> end of this message. Instead, the address type should be taken from
> the adapter variable, which is initialised using device_get_adapter
> at the beggining of the function.
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/1] bap: Fix setting adapter address type for unicast
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=74545026520a

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] 4+ messages in thread

end of thread, other threads:[~2024-03-25 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 13:19 [PATCH BlueZ 0/1] bap: Fix setting adapter address type for unicast Vlad Pruteanu
2024-03-25 13:19 ` [PATCH BlueZ 1/1] " Vlad Pruteanu
2024-03-25 15:03   ` bluez.test.bot
2024-03-25 19:40 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.