From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v3 8/8] Bluetooth: ISO: Fix another instance of dst_type handling
Date: Tue, 7 Oct 2025 18:31:55 -0400 [thread overview]
Message-ID: <20251007223155.1539954-8-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20251007223155.1539954-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Socket dst_type cannot be directly assigned to hci_conn->type since
there domain is different which may lead to the wrong address type being
used.
Fixes: 6a5ad251b7cd ("Bluetooth: ISO: Fix possible circular locking dependency")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/iso.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index a8986c69bd19..ab2b4de383ce 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -2143,7 +2143,13 @@ static void iso_conn_ready(struct iso_conn *conn)
}
bacpy(&iso_pi(sk)->dst, &hcon->dst);
- iso_pi(sk)->dst_type = hcon->dst_type;
+
+ /* Convert from HCI to three-value type */
+ if (hcon->dst_type == ADDR_LE_DEV_PUBLIC)
+ iso_pi(sk)->dst_type = BDADDR_LE_PUBLIC;
+ else
+ iso_pi(sk)->dst_type = BDADDR_LE_RANDOM;
+
iso_pi(sk)->sync_handle = iso_pi(parent)->sync_handle;
memcpy(iso_pi(sk)->base, iso_pi(parent)->base, iso_pi(parent)->base_len);
iso_pi(sk)->base_len = iso_pi(parent)->base_len;
--
2.51.0
next prev parent reply other threads:[~2025-10-07 22:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 22:31 [PATCH v3 1/8] Bluetooth: HCI: Add initial support for PAST Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 2/8] Bluetooth: hci_core: Introduce HCI_CONN_FLAG_PAST Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 3/8] Bluetooth: ISO: Add support to bind to trigger PAST Luiz Augusto von Dentz
2025-10-08 20:14 ` Pauli Virtanen
2025-10-07 22:31 ` [PATCH v3 4/8] Bluetooth: HCI: Always use the identity address when initializing a connection Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 5/8] Bluetooth: ISO: Attempt to resolve broadcast address Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 6/8] Bluetooth: MGMT: Allow use of Set Device Flags without Add Device Luiz Augusto von Dentz
2025-10-07 22:31 ` [PATCH v3 7/8] Bluetooth: ISO: Fix not updating BIS sender source address Luiz Augusto von Dentz
2025-10-07 22:31 ` Luiz Augusto von Dentz [this message]
2025-10-07 22:58 ` [v3,1/8] Bluetooth: HCI: Add initial support for PAST bluez.test.bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251007223155.1539954-8-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox