* [PATCH] fix: bluetooth: virtbt_probe: open_failed path calls hci_free_dev instead of hci_unregister_dev
@ 2026-06-26 11:50 WenTao Liang
2026-06-26 13:37 ` bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: WenTao Liang @ 2026-06-26 11:50 UTC (permalink / raw)
To: marcel, luiz.dentz; +Cc: linux-bluetooth, linux-kernel, WenTao Liang, stable
When virtbt_open_vdev fails after hci_register_dev succeeds, the
open_failed error path calls hci_free_dev, which only releases the
allocation reference. The Bluetooth subsystem still holds a registration
reference and keeps the device on hci_dev_list. Fix by calling
hci_unregister_dev first, then hci_free_dev, matching the pattern in
virtbt_remove.
Cc: stable@vger.kernel.org
Fixes: dc65b4b0f90a ("Bluetooth: virtio_bt: fix device removal")
Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
---
drivers/bluetooth/virtio_bt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index 140ab55c9fc5..bf6827431bb8 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -397,6 +397,7 @@ static int virtbt_probe(struct virtio_device *vdev)
return 0;
open_failed:
+ hci_unregister_dev(hdev);
hci_free_dev(hdev);
failed:
vdev->config->del_vqs(vdev);
--
2.39.5 (Apple Git-154)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: fix: bluetooth: virtbt_probe: open_failed path calls hci_free_dev instead of hci_unregister_dev
2026-06-26 11:50 [PATCH] fix: bluetooth: virtbt_probe: open_failed path calls hci_free_dev instead of hci_unregister_dev WenTao Liang
@ 2026-06-26 13:37 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-06-26 13:37 UTC (permalink / raw)
To: linux-bluetooth, vulab
[-- Attachment #1: Type: text/plain, Size: 1661 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=1117044
---Test result---
Test Summary:
CheckPatch PASS 1.27 seconds
VerifyFixes PASS 0.24 seconds
VerifySignedoff PASS 0.25 seconds
GitLint FAIL 0.68 seconds
SubjectPrefix FAIL 0.32 seconds
BuildKernel PASS 24.95 seconds
CheckAllWarning PASS 27.29 seconds
CheckSparse PASS 26.40 seconds
BuildKernel32 PASS 23.83 seconds
CheckKernelLLVM SKIP 0.00 seconds
TestRunnerSetup PASS 449.87 seconds
IncrementalBuild PASS 23.67 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
fix: bluetooth: virtbt_probe: open_failed path calls hci_free_dev instead of hci_unregister_dev
1: T1 Title exceeds max length (95>80): "fix: bluetooth: virtbt_probe: open_failed path calls hci_free_dev instead of hci_unregister_dev"
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found
https://github.com/bluez/bluetooth-next/pull/356
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-26 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26 11:50 [PATCH] fix: bluetooth: virtbt_probe: open_failed path calls hci_free_dev instead of hci_unregister_dev WenTao Liang
2026-06-26 13:37 ` 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