* [PATCH v4] Bluetooth: iso: fix socket matching ambiguity between BIS and CIS
@ 2025-10-27 6:10 Yang Li via B4 Relay
2025-10-27 6:44 ` [v4] " bluez.test.bot
2025-10-28 21:30 ` [PATCH v4] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Yang Li via B4 Relay @ 2025-10-27 6:10 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz
Cc: linux-bluetooth, linux-kernel, Yang Li
From: Yang Li <yang.li@amlogic.com>
When both BIS and CIS links exist, their sockets are in
the BT_LISTEN state.
dump sock:
sk 000000001977ef51 state 6
src 10:a5:62:31:05:cf dst 00:00:00:00:00:00
sk 0000000031d28700 state 7
src 10:a5:62:31:05:cf dst00:00:00:00:00:00
sk 00000000613af00e state 4 # listen sock of bis
src 10:a5:62:31:05:cf dst 54:00:00:d4:99:30
sk 000000001710468c state 9
src 10:a5:62:31:05:cf dst 54:00:00:d4:99:30
sk 000000005d97dfde state 4 #listen sock of cis
src 10:a5:62:31:05:cf dst 00:00:00:00:00:00
To locate the CIS socket correctly, check both the BT_LISTEN
state and whether dst addr is BDADDR_ANY.
Link: https://github.com/bluez/bluez/issues/1224
Signed-off-by: Yang Li <yang.li@amlogic.com>
---
Changes in v4:
- Rebase code.
- Link to v3: https://lore.kernel.org/r/20250731-bis_cis_coexist-v3-1-1f9bd60ef712@amlogic.com
---
net/bluetooth/iso.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index aa63c8955a53..74ec7d125c88 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -2021,6 +2021,11 @@ static bool iso_match_pa_sync_flag(struct sock *sk, void *data)
return test_bit(BT_SK_PA_SYNC, &iso_pi(sk)->flags);
}
+static bool iso_match_dst(struct sock *sk, void *data)
+{
+ return !bacmp(&iso_pi(sk)->dst, (bdaddr_t *)data);
+}
+
static void iso_conn_ready(struct iso_conn *conn)
{
struct sock *parent = NULL;
@@ -2105,7 +2110,7 @@ static void iso_conn_ready(struct iso_conn *conn)
if (!parent)
parent = iso_get_sock(hdev, &hcon->src, BDADDR_ANY,
- BT_LISTEN, NULL, NULL);
+ BT_LISTEN, iso_match_dst, BDADDR_ANY);
if (!parent)
return;
@@ -2374,7 +2379,7 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
}
} else {
sk = iso_get_sock(hdev, &hdev->bdaddr, BDADDR_ANY,
- BT_LISTEN, NULL, NULL);
+ BT_LISTEN, iso_match_dst, BDADDR_ANY);
}
done:
---
base-commit: f63037a3f252522504774c98960282fb776ef3ca
change-id: 20250731-bis_cis_coexist-717a442d5c42
Best regards,
--
Yang Li <yang.li@amlogic.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [v4] Bluetooth: iso: fix socket matching ambiguity between BIS and CIS
2025-10-27 6:10 [PATCH v4] Bluetooth: iso: fix socket matching ambiguity between BIS and CIS Yang Li via B4 Relay
@ 2025-10-27 6:44 ` bluez.test.bot
2025-10-28 21:30 ` [PATCH v4] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-10-27 6:44 UTC (permalink / raw)
To: linux-bluetooth, yang.li
[-- Attachment #1: Type: text/plain, Size: 2430 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=1016055
---Test result---
Test Summary:
CheckPatch PENDING 0.26 seconds
GitLint PENDING 0.32 seconds
SubjectPrefix PASS 0.12 seconds
BuildKernel PASS 25.49 seconds
CheckAllWarning PASS 27.75 seconds
CheckSparse PASS 31.46 seconds
BuildKernel32 PASS 25.19 seconds
TestRunnerSetup PASS 501.55 seconds
TestRunner_l2cap-tester PASS 25.19 seconds
TestRunner_iso-tester FAIL 33.98 seconds
TestRunner_bnep-tester PASS 6.18 seconds
TestRunner_mgmt-tester FAIL 112.22 seconds
TestRunner_rfcomm-tester PASS 9.29 seconds
TestRunner_sco-tester PASS 15.37 seconds
TestRunner_ioctl-tester PASS 10.13 seconds
TestRunner_mesh-tester FAIL 11.49 seconds
TestRunner_smp-tester PASS 8.59 seconds
TestRunner_userchan-tester PASS 6.57 seconds
IncrementalBuild PENDING 0.70 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
No test result found
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.098 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 1.920 seconds
Mesh - Send cancel - 2 Timed out 1.995 seconds
##############################
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 v4] Bluetooth: iso: fix socket matching ambiguity between BIS and CIS
2025-10-27 6:10 [PATCH v4] Bluetooth: iso: fix socket matching ambiguity between BIS and CIS Yang Li via B4 Relay
2025-10-27 6:44 ` [v4] " bluez.test.bot
@ 2025-10-28 21:30 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-10-28 21:30 UTC (permalink / raw)
To: Yang Li; +Cc: marcel, johan.hedberg, luiz.dentz, linux-bluetooth, linux-kernel
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 27 Oct 2025 14:10:02 +0800 you wrote:
> From: Yang Li <yang.li@amlogic.com>
>
> When both BIS and CIS links exist, their sockets are in
> the BT_LISTEN state.
> dump sock:
> sk 000000001977ef51 state 6
> src 10:a5:62:31:05:cf dst 00:00:00:00:00:00
> sk 0000000031d28700 state 7
> src 10:a5:62:31:05:cf dst00:00:00:00:00:00
> sk 00000000613af00e state 4 # listen sock of bis
> src 10:a5:62:31:05:cf dst 54:00:00:d4:99:30
> sk 000000001710468c state 9
> src 10:a5:62:31:05:cf dst 54:00:00:d4:99:30
> sk 000000005d97dfde state 4 #listen sock of cis
> src 10:a5:62:31:05:cf dst 00:00:00:00:00:00
>
> [...]
Here is the summary with links:
- [v4] Bluetooth: iso: fix socket matching ambiguity between BIS and CIS
https://git.kernel.org/bluetooth/bluetooth-next/c/7361123a3362
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-10-28 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 6:10 [PATCH v4] Bluetooth: iso: fix socket matching ambiguity between BIS and CIS Yang Li via B4 Relay
2025-10-27 6:44 ` [v4] " bluez.test.bot
2025-10-28 21:30 ` [PATCH v4] " 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;
as well as URLs for NNTP newsgroup(s).