* [PATCH RESEND] Bluetooth: hci_sync: add conditional locking annotations
@ 2026-08-16 8:59 Pauli Virtanen
2026-08-17 19:46 ` patchwork-bot+bluetooth
0 siblings, 1 reply; 2+ messages in thread
From: Pauli Virtanen @ 2026-08-16 8:59 UTC (permalink / raw)
To: linux-bluetooth
Cc: Pauli Virtanen, marcel, luiz.dentz, nicoyip.dev, linux-kernel,
Nathan Chancellor
Add context analysis annotations to functions doing conditional locking,
to suppress analysis warnings.
Fixes: a3ad01d51d4b ("Bluetooth: hci_sync: Fix advertising data UAFs")
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Pauli Virtanen <pav@iki.fi>
---
Notes:
- resend, no changes
- fixes build with CONFIG_WERROR=y
Context analysis is enabled by default, the annotations must be
correct to build with -Werror.
net/bluetooth/hci_sync.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index ea8baf05178e..7150037a864b 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -1287,6 +1287,7 @@ hci_set_ext_adv_params_sync(struct hci_dev *hdev, u8 instance,
}
static int hci_set_ext_adv_data_sync(struct hci_dev *hdev, u8 instance)
+ __context_unsafe(/* conditional locking */)
{
DEFINE_FLEX(struct hci_cp_le_set_ext_adv_data, pdu, data, length,
HCI_MAX_EXT_AD_LENGTH);
@@ -1375,6 +1376,7 @@ int hci_update_adv_data_sync(struct hci_dev *hdev, u8 instance)
}
int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)
+ __context_unsafe(/* conditional locking */)
{
struct hci_cp_le_set_ext_adv_params cp;
struct hci_rp_le_set_ext_adv_params rp;
@@ -1535,6 +1537,7 @@ int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)
}
static int hci_set_ext_scan_rsp_data_sync(struct hci_dev *hdev, u8 instance)
+ __context_unsafe(/* conditional locking */)
{
DEFINE_FLEX(struct hci_cp_le_set_ext_scan_rsp_data, pdu, data, length,
HCI_MAX_EXT_AD_LENGTH);
@@ -1588,6 +1591,7 @@ static int hci_set_ext_scan_rsp_data_sync(struct hci_dev *hdev, u8 instance)
}
static int __hci_set_scan_rsp_data_sync(struct hci_dev *hdev, u8 instance)
+ __context_unsafe(/* conditional locking */)
{
struct hci_cp_le_set_scan_rsp_data cp;
u8 len;
@@ -1729,6 +1733,7 @@ static int hci_set_per_adv_params_sync(struct hci_dev *hdev, u8 instance,
}
static int hci_set_per_adv_data_sync(struct hci_dev *hdev, u8 instance)
+ __context_unsafe(/* conditional locking */)
{
DEFINE_FLEX(struct hci_cp_le_set_per_adv_data, pdu, data, length,
HCI_MAX_PER_AD_LENGTH);
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH RESEND] Bluetooth: hci_sync: add conditional locking annotations
2026-08-16 8:59 [PATCH RESEND] Bluetooth: hci_sync: add conditional locking annotations Pauli Virtanen
@ 2026-08-17 19:46 ` patchwork-bot+bluetooth
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2026-08-17 19:46 UTC (permalink / raw)
To: Pauli Virtanen
Cc: linux-bluetooth, marcel, luiz.dentz, nicoyip.dev, linux-kernel, nathan
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Sun, 16 Aug 2026 11:59:01 +0300 you wrote:
> Add context analysis annotations to functions doing conditional locking,
> to suppress analysis warnings.
>
> Fixes: a3ad01d51d4b ("Bluetooth: hci_sync: Fix advertising data UAFs")
> Tested-by: Nathan Chancellor <nathan@kernel.org> # build
> Signed-off-by: Pauli Virtanen <pav@iki.fi>
>
> [...]
Here is the summary with links:
- [RESEND] Bluetooth: hci_sync: add conditional locking annotations
https://git.kernel.org/bluetooth/bluetooth-next/c/26cf20d065b3
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] 2+ messages in thread
end of thread, other threads:[~2026-08-17 19:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-16 8:59 [PATCH RESEND] Bluetooth: hci_sync: add conditional locking annotations Pauli Virtanen
2026-08-17 19:46 ` 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
all inboxes | Powered by JetHome®