Skip to contentSkip to conversation

Bluetooth: hci_core: Fix triggering cmd_timer for HCI_OP_NOP

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Nov 13, 2025

Subsystems (2)
lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: hci_core: Fix triggering cmd_timer for HCI_OP_NOP

From: Luiz Augusto von Dentz <[email protected]>

HCI_OP_NOP means no command was actually sent so there is no point in triggering cmd_timer which may cause a hdev->reset in the process since it is assumed that the controller is stuck processing a command.

Fixes e2d471b7806b ("Bluetooth: ISO: Fix not using SID from adv report")
---
 net/bluetooth/hci_core.c | 6 ++++++
 1 file changed, 6 insertions(+)
net/bluetooth/hci_core.c +6 -0
index 3418d7b964a1..9f686e5903a1 100644
@@ -4168,6 +4168,12 @@ static void hci_cmd_work(struct work_struct *work)
 
 		hci_send_cmd_sync(hdev, skb);
 
+		/* Don't trigger cmd_timer in case of HCI_OP_NOP since there is
+		 * no command pending.
+		 */
+		if (hci_skb_opcode(skb) == HCI_OP_NOP)
+			return;
+
 		rcu_read_lock();
 		if (test_bit(HCI_RESET, &hdev->flags) ||
 		    hci_dev_test_flag(hdev, HCI_CMD_DRAIN_WORKQUEUE))
Signature · 1 line
2.51.1
#1 lore raw

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=1023033

---Test result---

Test Summary:

CheckPatch                    PENDING   0.29 seconds
GitLint                       PENDING   0.29 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      25.83 seconds
CheckAllWarning               PASS      28.91 seconds
CheckSparse                   WARNING   31.91 seconds
BuildKernel32                 PASS      25.39 seconds
TestRunnerSetup               PASS      508.81 seconds
TestRunner_l2cap-tester       PASS      24.18 seconds
TestRunner_iso-tester         PASS      69.14 seconds
TestRunner_bnep-tester        PASS      6.25 seconds
TestRunner_mgmt-tester        FAIL      123.27 seconds
TestRunner_rfcomm-tester      PASS      9.37 seconds
TestRunner_sco-tester         PASS      12.74 seconds
TestRunner_ioctl-tester       PASS      10.06 seconds
TestRunner_mesh-tester        FAIL      11.91 seconds
TestRunner_smp-tester         PASS      8.63 seconds
TestRunner_userchan-tester    PASS      6.53 seconds
IncrementalBuild              PENDING   0.66 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
net/bluetooth/hci_core.c:85:9: warning: context imbalance in '__hci_dev_get' - different lock contexts for basic blocknet/bluetooth/hci_core.c: note: in included file (through include/linux/notifier.h, include/linux/memory_hotplug.h, include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, include/linux/radix-tree.h, ...):
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 486 (98.8%), Failed: 2, Not Run: 4

Failed Test Cases

Read Exp Feature - Success                           Failed       0.103 seconds
LL Privacy - Set Flags 4 (RL is full)                Failed       0.211 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.978 seconds
Mesh - Send cancel - 2                               Timed out    1.999 seconds

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 10 lines · On Thu, 13 Nov 2025 10:12:24 -0500 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

HCI_OP_NOP means no command was actually sent so there is no point in triggering cmd_timer which may cause a hdev->reset in the process since it is assumed that the controller is stuck processing a command.

Fixes e2d471b7806b ("Bluetooth: ISO: Fix not using SID from adv report")

[...]

Here is the summary with links:
- [v1] Bluetooth: hci_core: Fix triggering cmd_timer for HCI_OP_NOP

    https://git.kernel.org/bluetooth/bluetooth-next/c/486a25d25a4b

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html