* [PATCH RESEND] Bluetooth: hci_sync: add conditional locking annotations
@ 2026-08-16 8:59 Pauli Virtanen
2026-08-16 10:00 ` [RESEND] " bluez.test.bot
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 related [flat|nested] 2+ messages in thread
* RE: [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-16 10:00 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-08-16 10:00 UTC (permalink / raw)
To: linux-bluetooth, pav
[-- Attachment #1: Type: text/plain, Size: 2782 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=1146702
---Test result---
Test Summary:
CheckPatch PASS 0.71 seconds
VerifyFixes PASS 0.12 seconds
VerifySignedoff PASS 0.12 seconds
GitLint FAIL 0.30 seconds
SubjectPrefix PASS 0.11 seconds
BuildKernel PASS 27.44 seconds
CheckAllWarning PASS 30.04 seconds
CheckSparse PASS 28.83 seconds
BuildKernel32 PASS 26.41 seconds
CheckKernelLLVM SKIP 0.00 seconds
TestRunnerSetup PASS 504.49 seconds
TestRunner_l2cap-tester PASS 64.87 seconds
TestRunner_iso-tester PASS 81.35 seconds
TestRunner_bnep-tester PASS 19.43 seconds
TestRunner_mgmt-tester FAIL 225.67 seconds
TestRunner_rfcomm-tester PASS 25.92 seconds
TestRunner_sco-tester PASS 31.38 seconds
TestRunner_ioctl-tester PASS 27.10 seconds
TestRunner_mesh-tester FAIL 25.92 seconds
TestRunner_smp-tester PASS 27.57 seconds
TestRunner_userchan-tester PASS 19.98 seconds
TestRunner_6lowpan-tester PASS 23.16 seconds
IncrementalBuild PASS 25.83 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[RESEND] Bluetooth: hci_sync: add conditional locking annotations
12: B2 Line has trailing whitespace: " "
14: B2 Line has trailing whitespace: " "
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 501, Passed: 494 (98.6%), Failed: 3, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.252 seconds
LL Privacy - Set Flags 2 (Enable RL) Failed 0.408 seconds
LL Privacy - Start Discovery 1 (Disable RL) Failed 0.400 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 2.314 seconds
Mesh - Send cancel - 2 Timed out 1.983 seconds
https://github.com/bluez/bluetooth-next/pull/591
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-16 10:00 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-16 10:00 ` [RESEND] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox