* [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
@ 2026-12-03 10:59 Sasha Levin
2026-12-03 16:16 ` Luiz Augusto von Dentz
2026-12-04 2:14 ` bluez.test.bot
0 siblings, 2 replies; 11+ messages in thread
From: Sasha Levin @ 2026-12-03 10:59 UTC (permalink / raw)
To: Luiz Augusto von Dentz, Marcel Holtmann
Cc: Ajay KV, Kiran K, Rosen Penev, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-bluetooth,
llvm, linux-kernel
With clang 23 and CONFIG_WARN_CONTEXT_ANALYSIS, which drivers/bluetooth
is opted into, btintel_pcie_yoyo_send_hcmds() triggers two warnings, and
with CONFIG_WERROR the build fails:
btintel_pcie.c:981:2: error: mutex 'data->hdev->req_lock' is not
held on every path through here [-Werror,-Wthread-safety-analysis]
btintel_pcie.c:1049:3: error: releasing mutex 'data->hdev->req_lock'
that was not held [-Werror,-Wthread-safety-analysis]
The function takes hdev->req_lock only when its caller does not hold it,
and releases it at the end under the same condition. The analysis cannot
match a conditional lock with a later conditional unlock in the same
function.
Move the part that runs under req_lock into
btintel_pcie_yoyo_send_hcmds_locked(). Callers that hold the lock go
straight to it, and the path that takes the lock releases it
unconditionally. No functional change.
Fixes: 738af1958d2e ("Bluetooth: btintel_pcie: Dispatch yoyo triggers at timepoints")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Based on bluetooth-next (738af1958d2e).
The two mac_access_lock errors of the same kind, in
btintel_pcie_apply_yoyo_config_sets(), are still there after this
patch. Rosen Penev's patch fixes those:
https://lore.kernel.org/all/20261126000439.318058-1-rosenp@gmail.com/
It needs "git am -3" on today's bluetooth-next, and can go in before or
after this one. With both applied drivers/bluetooth builds on x86_64
allmodconfig with clang 23.1.6.
drivers/bluetooth/btintel_pcie.c | 111 +++++++++++++++++--------------
1 file changed, 60 insertions(+), 51 deletions(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index ab24c3c75f1b0..a5bef0b24773f 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -923,65 +923,20 @@ static void btintel_pcie_release_mac_access(struct btintel_pcie_data *data)
}
}
-/* btintel_pcie_yoyo_send_hcmds - Send all HCI commands configured for a timepoint */
-static void btintel_pcie_yoyo_send_hcmds(struct btintel_pcie_data *data,
- enum btintel_pcie_dbg_timepoint tp,
- bool req_locked)
+/* Send the HCI commands configured for @tp. The caller holds hdev->req_lock. */
+static void btintel_pcie_yoyo_send_hcmds_locked(struct btintel_pcie_data *data,
+ enum btintel_pcie_dbg_timepoint tp)
{
struct btintel_pcie_yoyo_hcmd *hcmd;
- struct hci_dev *hdev;
struct sk_buff *skb;
u8 plen;
u16 opcode;
- if (!data)
- return;
-
- hdev = data->hdev;
- if (!hdev)
- return;
-
- /* __hci_cmd_sync() requires req_lock, taken before yoyo.lock to match
- * the order setup established. Suspend and resume do not hold it, so
- * take it only when the timepoint has commands to send.
- */
- if (!req_locked) {
- bool found = false;
-
- mutex_lock(&data->yoyo.lock);
- if (data->yoyo.enabled) {
- list_for_each_entry(hcmd, &data->yoyo.hcmd_list, list) {
- if (hcmd->time_point == tp) {
- found = true;
- break;
- }
- }
- }
- mutex_unlock(&data->yoyo.lock);
-
- if (!found)
- return;
-
- hci_req_sync_lock(hdev);
-
- /* A closed device rejects the commands and a user channel
- * consumes their completion, so __hci_cmd_sync() would only
- * fail or time out into a controller reset.
- */
- if (!test_bit(HCI_UP, &hdev->flags) ||
- hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
- bt_dev_dbg(hdev, "YoYo: hdev down or user channel, tp %u commands skipped",
- tp);
- hci_req_sync_unlock(hdev);
- return;
- }
- }
-
/* Held across __hci_cmd_sync() so cleanup cannot free entries in use */
mutex_lock(&data->yoyo.lock);
if (!data->yoyo.enabled) {
mutex_unlock(&data->yoyo.lock);
- goto unlock;
+ return;
}
list_for_each_entry(hcmd, &data->yoyo.hcmd_list, list) {
@@ -1044,9 +999,63 @@ static void btintel_pcie_yoyo_send_hcmds(struct btintel_pcie_data *data,
}
mutex_unlock(&data->yoyo.lock);
-unlock:
- if (!req_locked)
+}
+
+/* btintel_pcie_yoyo_send_hcmds - Send all HCI commands configured for a timepoint */
+static void btintel_pcie_yoyo_send_hcmds(struct btintel_pcie_data *data,
+ enum btintel_pcie_dbg_timepoint tp,
+ bool req_locked)
+{
+ struct btintel_pcie_yoyo_hcmd *hcmd;
+ struct hci_dev *hdev;
+ bool found = false;
+
+ if (!data)
+ return;
+
+ hdev = data->hdev;
+ if (!hdev)
+ return;
+
+ if (req_locked) {
+ btintel_pcie_yoyo_send_hcmds_locked(data, tp);
+ return;
+ }
+
+ /* __hci_cmd_sync() requires req_lock, taken before yoyo.lock to match
+ * the order setup established. Suspend and resume do not hold it, so
+ * take it only when the timepoint has commands to send.
+ */
+ mutex_lock(&data->yoyo.lock);
+ if (data->yoyo.enabled) {
+ list_for_each_entry(hcmd, &data->yoyo.hcmd_list, list) {
+ if (hcmd->time_point == tp) {
+ found = true;
+ break;
+ }
+ }
+ }
+ mutex_unlock(&data->yoyo.lock);
+
+ if (!found)
+ return;
+
+ hci_req_sync_lock(hdev);
+
+ /* A closed device rejects the commands and a user channel
+ * consumes their completion, so __hci_cmd_sync() would only
+ * fail or time out into a controller reset.
+ */
+ if (!test_bit(HCI_UP, &hdev->flags) ||
+ hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
+ bt_dev_dbg(hdev, "YoYo: hdev down or user channel, tp %u commands skipped",
+ tp);
hci_req_sync_unlock(hdev);
+ return;
+ }
+
+ btintel_pcie_yoyo_send_hcmds_locked(data, tp);
+ hci_req_sync_unlock(hdev);
}
static void
base-commit: 738af1958d2e7205008ca818352199ae8e454509
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 10:59 [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock Sasha Levin
@ 2026-12-03 16:16 ` Luiz Augusto von Dentz
2026-12-03 17:53 ` Sasha Levin
2026-12-04 2:14 ` bluez.test.bot
1 sibling, 1 reply; 11+ messages in thread
From: Luiz Augusto von Dentz @ 2026-12-03 16:16 UTC (permalink / raw)
To: Sasha Levin
Cc: Marcel Holtmann, Ajay KV, Kiran K, Rosen Penev, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-bluetooth,
llvm, linux-kernel
Hi Sasha,
On Thu, Dec 3, 2026 at 5:59 AM Sasha Levin <sashal@kernel.org> wrote:
>
> With clang 23 and CONFIG_WARN_CONTEXT_ANALYSIS, which drivers/bluetooth
> is opted into, btintel_pcie_yoyo_send_hcmds() triggers two warnings, and
> with CONFIG_WERROR the build fails:
>
> btintel_pcie.c:981:2: error: mutex 'data->hdev->req_lock' is not
> held on every path through here [-Werror,-Wthread-safety-analysis]
> btintel_pcie.c:1049:3: error: releasing mutex 'data->hdev->req_lock'
> that was not held [-Werror,-Wthread-safety-analysis]
Can you give some more context so I can try enabling it in our CI to
avoid committing new code with this problem. (No need to respin just
want a lead to enable this sort of errors in our CI).
> The function takes hdev->req_lock only when its caller does not hold it,
> and releases it at the end under the same condition. The analysis cannot
> match a conditional lock with a later conditional unlock in the same
> function.
>
> Move the part that runs under req_lock into
> btintel_pcie_yoyo_send_hcmds_locked(). Callers that hold the lock go
> straight to it, and the path that takes the lock releases it
> unconditionally. No functional change.
>
> Fixes: 738af1958d2e ("Bluetooth: btintel_pcie: Dispatch yoyo triggers at timepoints")
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> Based on bluetooth-next (738af1958d2e).
>
> The two mac_access_lock errors of the same kind, in
> btintel_pcie_apply_yoyo_config_sets(), are still there after this
> patch. Rosen Penev's patch fixes those:
>
> https://lore.kernel.org/all/20261126000439.318058-1-rosenp@gmail.com/
>
> It needs "git am -3" on today's bluetooth-next, and can go in before or
> after this one. With both applied drivers/bluetooth builds on x86_64
> allmodconfig with clang 23.1.6.
>
> drivers/bluetooth/btintel_pcie.c | 111 +++++++++++++++++--------------
> 1 file changed, 60 insertions(+), 51 deletions(-)
>
> diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
> index ab24c3c75f1b0..a5bef0b24773f 100644
> --- a/drivers/bluetooth/btintel_pcie.c
> +++ b/drivers/bluetooth/btintel_pcie.c
> @@ -923,65 +923,20 @@ static void btintel_pcie_release_mac_access(struct btintel_pcie_data *data)
> }
> }
>
> -/* btintel_pcie_yoyo_send_hcmds - Send all HCI commands configured for a timepoint */
> -static void btintel_pcie_yoyo_send_hcmds(struct btintel_pcie_data *data,
> - enum btintel_pcie_dbg_timepoint tp,
> - bool req_locked)
> +/* Send the HCI commands configured for @tp. The caller holds hdev->req_lock. */
> +static void btintel_pcie_yoyo_send_hcmds_locked(struct btintel_pcie_data *data,
> + enum btintel_pcie_dbg_timepoint tp)
> {
> struct btintel_pcie_yoyo_hcmd *hcmd;
> - struct hci_dev *hdev;
> struct sk_buff *skb;
> u8 plen;
> u16 opcode;
>
> - if (!data)
> - return;
> -
> - hdev = data->hdev;
> - if (!hdev)
> - return;
> -
> - /* __hci_cmd_sync() requires req_lock, taken before yoyo.lock to match
> - * the order setup established. Suspend and resume do not hold it, so
> - * take it only when the timepoint has commands to send.
> - */
> - if (!req_locked) {
> - bool found = false;
> -
> - mutex_lock(&data->yoyo.lock);
> - if (data->yoyo.enabled) {
> - list_for_each_entry(hcmd, &data->yoyo.hcmd_list, list) {
> - if (hcmd->time_point == tp) {
> - found = true;
> - break;
> - }
> - }
> - }
> - mutex_unlock(&data->yoyo.lock);
> -
> - if (!found)
> - return;
> -
> - hci_req_sync_lock(hdev);
> -
> - /* A closed device rejects the commands and a user channel
> - * consumes their completion, so __hci_cmd_sync() would only
> - * fail or time out into a controller reset.
> - */
> - if (!test_bit(HCI_UP, &hdev->flags) ||
> - hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
> - bt_dev_dbg(hdev, "YoYo: hdev down or user channel, tp %u commands skipped",
> - tp);
> - hci_req_sync_unlock(hdev);
> - return;
> - }
> - }
> -
> /* Held across __hci_cmd_sync() so cleanup cannot free entries in use */
> mutex_lock(&data->yoyo.lock);
> if (!data->yoyo.enabled) {
> mutex_unlock(&data->yoyo.lock);
> - goto unlock;
> + return;
> }
>
> list_for_each_entry(hcmd, &data->yoyo.hcmd_list, list) {
> @@ -1044,9 +999,63 @@ static void btintel_pcie_yoyo_send_hcmds(struct btintel_pcie_data *data,
> }
>
> mutex_unlock(&data->yoyo.lock);
> -unlock:
> - if (!req_locked)
> +}
> +
> +/* btintel_pcie_yoyo_send_hcmds - Send all HCI commands configured for a timepoint */
> +static void btintel_pcie_yoyo_send_hcmds(struct btintel_pcie_data *data,
> + enum btintel_pcie_dbg_timepoint tp,
> + bool req_locked)
> +{
> + struct btintel_pcie_yoyo_hcmd *hcmd;
> + struct hci_dev *hdev;
> + bool found = false;
> +
> + if (!data)
> + return;
> +
> + hdev = data->hdev;
> + if (!hdev)
> + return;
> +
> + if (req_locked) {
> + btintel_pcie_yoyo_send_hcmds_locked(data, tp);
> + return;
> + }
> +
> + /* __hci_cmd_sync() requires req_lock, taken before yoyo.lock to match
> + * the order setup established. Suspend and resume do not hold it, so
> + * take it only when the timepoint has commands to send.
> + */
> + mutex_lock(&data->yoyo.lock);
> + if (data->yoyo.enabled) {
> + list_for_each_entry(hcmd, &data->yoyo.hcmd_list, list) {
> + if (hcmd->time_point == tp) {
> + found = true;
> + break;
> + }
> + }
> + }
> + mutex_unlock(&data->yoyo.lock);
> +
> + if (!found)
> + return;
> +
> + hci_req_sync_lock(hdev);
> +
> + /* A closed device rejects the commands and a user channel
> + * consumes their completion, so __hci_cmd_sync() would only
> + * fail or time out into a controller reset.
> + */
> + if (!test_bit(HCI_UP, &hdev->flags) ||
> + hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
> + bt_dev_dbg(hdev, "YoYo: hdev down or user channel, tp %u commands skipped",
> + tp);
> hci_req_sync_unlock(hdev);
> + return;
> + }
> +
> + btintel_pcie_yoyo_send_hcmds_locked(data, tp);
> + hci_req_sync_unlock(hdev);
> }
>
> static void
>
> base-commit: 738af1958d2e7205008ca818352199ae8e454509
> --
> 2.53.0
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 16:16 ` Luiz Augusto von Dentz
@ 2026-12-03 17:53 ` Sasha Levin
2026-12-03 18:01 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 11+ messages in thread
From: Sasha Levin @ 2026-12-03 17:53 UTC (permalink / raw)
To: Luiz Augusto von Dentz
Cc: Marcel Holtmann, Ajay KV, Kiran K, Rosen Penev, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-bluetooth,
llvm, linux-kernel
On Thu, Dec 03, 2026 at 11:16:40AM -0500, Luiz Augusto von Dentz wrote:
>Can you give some more context so I can try enabling it in our CI to
>avoid committing new code with this problem. (No need to respin just
>want a lead to enable this sort of errors in our CI).
It just needs clang 23 or newer. CONFIG_WARN_CONTEXT_ANALYSIS depends on
that and defaults to y, and drivers/bluetooth and net/bluetooth already
have CONTEXT_ANALYSIS := y in their Makefiles. They're warnings unless
CONFIG_WERROR is set.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 17:53 ` Sasha Levin
@ 2026-12-03 18:01 ` Luiz Augusto von Dentz
2026-12-03 18:15 ` Sasha Levin
2026-12-03 18:52 ` Pauli Virtanen
0 siblings, 2 replies; 11+ messages in thread
From: Luiz Augusto von Dentz @ 2026-12-03 18:01 UTC (permalink / raw)
To: Sasha Levin
Cc: Marcel Holtmann, Ajay KV, Kiran K, Rosen Penev, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-bluetooth,
llvm, linux-kernel
Hi Sasha,
On Thu, Dec 3, 2026 at 12:53 PM Sasha Levin <sashal@kernel.org> wrote:
>
> On Thu, Dec 03, 2026 at 11:16:40AM -0500, Luiz Augusto von Dentz wrote:
> >Can you give some more context so I can try enabling it in our CI to
> >avoid committing new code with this problem. (No need to respin just
> >want a lead to enable this sort of errors in our CI).
>
> It just needs clang 23 or newer. CONFIG_WARN_CONTEXT_ANALYSIS depends on
> that and defaults to y, and drivers/bluetooth and net/bluetooth already
> have CONTEXT_ANALYSIS := y in their Makefiles. They're warnings unless
> CONFIG_WERROR is set.
By clang 23 you mean LLVM=1 as well? There is a ton of other errors if
I enable CONFIG_WERROR so I assume this is just checking for new
errors in which case we need some sort of history to compare to.
> --
> Thanks,
> Sasha
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 18:01 ` Luiz Augusto von Dentz
@ 2026-12-03 18:15 ` Sasha Levin
2026-12-03 19:31 ` Nick Desaulniers
2026-12-03 18:52 ` Pauli Virtanen
1 sibling, 1 reply; 11+ messages in thread
From: Sasha Levin @ 2026-12-03 18:15 UTC (permalink / raw)
To: Luiz Augusto von Dentz
Cc: Marcel Holtmann, Ajay KV, Kiran K, Rosen Penev, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-bluetooth,
llvm, linux-kernel
On Thu, Dec 03, 2026 at 01:01:48PM -0500, Luiz Augusto von Dentz wrote:
>By clang 23 you mean LLVM=1 as well? There is a ton of other errors if
>I enable CONFIG_WERROR so I assume this is just checking for new
>errors in which case we need some sort of history to compare to.
LLVM=1 is the usual way, but CC=clang is enough since the option only
depends on CC_IS_CLANG.
You don't need CONFIG_WERROR for this. All of these warnings are tagged
-Wthread-safety-something, so your CI can just fail if any line in the
build output contains "-Wthread-safety".
Could you send me the build log with the other errors? I've been
fixing the new clang 23 warnings around the tree, so I'd like to see
what's still there.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 18:01 ` Luiz Augusto von Dentz
2026-12-03 18:15 ` Sasha Levin
@ 2026-12-03 18:52 ` Pauli Virtanen
2026-12-03 18:55 ` Luiz Augusto von Dentz
1 sibling, 1 reply; 11+ messages in thread
From: Pauli Virtanen @ 2026-12-03 18:52 UTC (permalink / raw)
To: Luiz Augusto von Dentz, Sasha Levin; +Cc: linux-bluetooth, llvm, linux-kernel
Hi Luiz,
to, 2026-12-03 kello 13:01 -0500, Luiz Augusto von Dentz kirjoitti:
> Hi Sasha,
>
> On Thu, Dec 3, 2026 at 12:53 PM Sasha Levin <sashal@kernel.org> wrote:
> >
> > On Thu, Dec 03, 2026 at 11:16:40AM -0500, Luiz Augusto von Dentz wrote:
> > > Can you give some more context so I can try enabling it in our CI to
> > > avoid committing new code with this problem. (No need to respin just
> > > want a lead to enable this sort of errors in our CI).
> >
> > It just needs clang 23 or newer. CONFIG_WARN_CONTEXT_ANALYSIS depends on
> > that and defaults to y, and drivers/bluetooth and net/bluetooth already
> > have CONTEXT_ANALYSIS := y in their Makefiles. They're warnings unless
> > CONFIG_WERROR is set.
>
> By clang 23 you mean LLVM=1 as well? There is a ton of other errors if
> I enable CONFIG_WERROR so I assume this is just checking for new
> errors in which case we need some sort of history to compare to.
There is LLVM build test (CheckKernelLLVM) with context analysis +
Werror enabled in the bluez CI.
CONFIG_BT_INTEL_PCIE=y seems missing from bluez/doc/ci.config that the
kernel CI build tests use, so the build tests are probably not running
for this driver.
--
Pauli Virtanen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 18:52 ` Pauli Virtanen
@ 2026-12-03 18:55 ` Luiz Augusto von Dentz
2026-12-03 19:17 ` Sasha Levin
2026-12-03 19:32 ` Pauli Virtanen
0 siblings, 2 replies; 11+ messages in thread
From: Luiz Augusto von Dentz @ 2026-12-03 18:55 UTC (permalink / raw)
To: Pauli Virtanen; +Cc: Sasha Levin, linux-bluetooth, llvm, linux-kernel
Hi Pauli,
On Thu, Dec 3, 2026 at 1:52 PM Pauli Virtanen <pav@iki.fi> wrote:
>
> Hi Luiz,
>
> to, 2026-12-03 kello 13:01 -0500, Luiz Augusto von Dentz kirjoitti:
> > Hi Sasha,
> >
> > On Thu, Dec 3, 2026 at 12:53 PM Sasha Levin <sashal@kernel.org> wrote:
> > >
> > > On Thu, Dec 03, 2026 at 11:16:40AM -0500, Luiz Augusto von Dentz wrote:
> > > > Can you give some more context so I can try enabling it in our CI to
> > > > avoid committing new code with this problem. (No need to respin just
> > > > want a lead to enable this sort of errors in our CI).
> > >
> > > It just needs clang 23 or newer. CONFIG_WARN_CONTEXT_ANALYSIS depends on
> > > that and defaults to y, and drivers/bluetooth and net/bluetooth already
> > > have CONTEXT_ANALYSIS := y in their Makefiles. They're warnings unless
> > > CONFIG_WERROR is set.
> >
> > By clang 23 you mean LLVM=1 as well? There is a ton of other errors if
> > I enable CONFIG_WERROR so I assume this is just checking for new
> > errors in which case we need some sort of history to compare to.
>
> There is LLVM build test (CheckKernelLLVM) with context analysis +
> Werror enabled in the bluez CI.
Is that using clang 23? Or do we need to update the container to use
that version?
> CONFIG_BT_INTEL_PCIE=y seems missing from bluez/doc/ci.config that the
> kernel CI build tests use, so the build tests are probably not running
> for this driver.
I guess action-ci needs to be updated then.
>
> --
> Pauli Virtanen
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 18:55 ` Luiz Augusto von Dentz
@ 2026-12-03 19:17 ` Sasha Levin
2026-12-03 19:32 ` Pauli Virtanen
1 sibling, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2026-12-03 19:17 UTC (permalink / raw)
To: Luiz Augusto von Dentz
Cc: Pauli Virtanen, linux-bluetooth, llvm, linux-kernel
On Thu, Dec 03, 2026 at 01:55:12PM -0500, Luiz Augusto von Dentz wrote:
>On Thu, Dec 3, 2026 at 1:52 PM Pauli Virtanen <pav@iki.fi> wrote:
>> There is LLVM build test (CheckKernelLLVM) with context analysis +
>> Werror enabled in the bluez CI.
>
>Is that using clang 23? Or do we need to update the container to use
>that version?
It needs clang 23. With an older clang CONFIG_WARN_CONTEXT_ANALYSIS
just gets turned off, so the test passes without checking anything.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 18:15 ` Sasha Levin
@ 2026-12-03 19:31 ` Nick Desaulniers
0 siblings, 0 replies; 11+ messages in thread
From: Nick Desaulniers @ 2026-12-03 19:31 UTC (permalink / raw)
To: Sasha Levin
Cc: Luiz Augusto von Dentz, Marcel Holtmann, Ajay KV, Kiran K,
Rosen Penev, Nathan Chancellor, Bill Wendling, Justin Stitt,
linux-bluetooth, llvm, linux-kernel
On Thu, Dec 3, 2026 at 10:15 AM Sasha Levin <sashal@kernel.org> wrote:
>
> On Thu, Dec 03, 2026 at 01:01:48PM -0500, Luiz Augusto von Dentz wrote:
> >By clang 23 you mean LLVM=1 as well? There is a ton of other errors if
> >I enable CONFIG_WERROR so I assume this is just checking for new
> >errors in which case we need some sort of history to compare to.
>
> LLVM=1 is the usual way, but CC=clang is enough since the option only
> depends on CC_IS_CLANG.
>
> You don't need CONFIG_WERROR for this. All of these warnings are tagged
> -Wthread-safety-something, so your CI can just fail if any line in the
> build output contains "-Wthread-safety".
>
> Could you send me the build log with the other errors? I've been
> fixing the new clang 23 warnings around the tree, so I'd like to see
> what's still there.
We've been having a few maintainers dragging @$$ on merging fixes for
nascent compiler diagnostics, such as -Wunsequenced-volatile. See also
https://github.com/ClangBuiltLinux/continuous-integration2/pull/943.
We could use help from other kernel devs that also observe these
warnings help provide reviewed-by and tested-by tags on the
outstanding patches. :pray:
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 18:55 ` Luiz Augusto von Dentz
2026-12-03 19:17 ` Sasha Levin
@ 2026-12-03 19:32 ` Pauli Virtanen
1 sibling, 0 replies; 11+ messages in thread
From: Pauli Virtanen @ 2026-12-03 19:32 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: Sasha Levin, linux-bluetooth, llvm, linux-kernel
Hi,
to, 2026-12-03 kello 13:55 -0500, Luiz Augusto von Dentz kirjoitti:
> On Thu, Dec 3, 2026 at 1:52 PM Pauli Virtanen <pav@iki.fi> wrote:
> > to, 2026-12-03 kello 13:01 -0500, Luiz Augusto von Dentz kirjoitti:
> > > On Thu, Dec 3, 2026 at 12:53 PM Sasha Levin <sashal@kernel.org> wrote:
> > > >
> > > > On Thu, Dec 03, 2026 at 11:16:40AM -0500, Luiz Augusto von Dentz wrote:
> > > > > Can you give some more context so I can try enabling it in our CI to
> > > > > avoid committing new code with this problem. (No need to respin just
> > > > > want a lead to enable this sort of errors in our CI).
> > > >
> > > > It just needs clang 23 or newer. CONFIG_WARN_CONTEXT_ANALYSIS depends on
> > > > that and defaults to y, and drivers/bluetooth and net/bluetooth already
> > > > have CONTEXT_ANALYSIS := y in their Makefiles. They're warnings unless
> > > > CONFIG_WERROR is set.
> > >
> > > By clang 23 you mean LLVM=1 as well? There is a ton of other errors if
> > > I enable CONFIG_WERROR so I assume this is just checking for new
> > > errors in which case we need some sort of history to compare to.
> >
> > There is LLVM build test (CheckKernelLLVM) with context analysis +
> > Werror enabled in the bluez CI.
>
> Is that using clang 23? Or do we need to update the container to use
> that version?
Yes, it is working:
https://lore.kernel.org/linux-bluetooth/6b0da550.18b9987f.3871c4.950b@mx.google.com/
The only problem looks like the intel pcie driver (and possibly others)
is not enabled in the kernel config.
> > CONFIG_BT_INTEL_PCIE=y seems missing from bluez/doc/ci.config that the
> > kernel CI build tests use, so the build tests are probably not running
> > for this driver.
>
> I guess action-ci needs to be updated then.
--
Pauli Virtanen
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Bluetooth: btintel_pcie: Fix context analysis errors on req_lock
2026-12-03 10:59 [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock Sasha Levin
2026-12-03 16:16 ` Luiz Augusto von Dentz
@ 2026-12-04 2:14 ` bluez.test.bot
1 sibling, 0 replies; 11+ messages in thread
From: bluez.test.bot @ 2026-12-04 2:14 UTC (permalink / raw)
To: linux-bluetooth, sashal
[-- Attachment #1: Type: text/plain, Size: 1020 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/series/1230482/
---Test result---
Test Summary:
CheckPatch PASS 0.63 seconds
VerifyFixes PASS 0.06 seconds
VerifySignedoff PASS 0.06 seconds
GitLint PASS 0.23 seconds
SubjectPrefix PASS 0.06 seconds
BuildKernel PASS 33.51 seconds
CheckAllWarning PASS 36.78 seconds
CheckSparse PASS 38.03 seconds
BuildKernel32 PASS 31.18 seconds
CheckKernelLLVM PASS 32.65 seconds
TestRunnerSetup PASS 745.57 seconds
IncrementalBuild PASS 29.08 seconds
https://github.com/bluez/bluetooth-next/pull/1280
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-12-04 2:14 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 10:59 [PATCH] Bluetooth: btintel_pcie: Fix context analysis errors on req_lock Sasha Levin
2026-12-03 16:16 ` Luiz Augusto von Dentz
2026-12-03 17:53 ` Sasha Levin
2026-12-03 18:01 ` Luiz Augusto von Dentz
2026-12-03 18:15 ` Sasha Levin
2026-12-03 19:31 ` Nick Desaulniers
2026-12-03 18:52 ` Pauli Virtanen
2026-12-03 18:55 ` Luiz Augusto von Dentz
2026-12-03 19:17 ` Sasha Levin
2026-12-03 19:32 ` Pauli Virtanen
2026-12-04 2:14 ` 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