* [PATCH] Bluetooth: Fix possible infinite recursion of btusb_reset
@ 2025-01-20 10:39 Hsin-chen Chuang
2025-01-21 16:40 ` patchwork-bot+bluetooth
0 siblings, 1 reply; 2+ messages in thread
From: Hsin-chen Chuang @ 2025-01-20 10:39 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
Cc: chromeos-bluetooth-upstreaming, Hsin-chen Chuang,
Marcel Holtmann, linux-kernel
From: Hsin-chen Chuang <chharry@chromium.org>
The function enters infinite recursion if the HCI device doesn't support
GPIO reset: btusb_reset -> hdev->reset -> vendor_reset -> btusb_reset...
btusb_reset shouldn't call hdev->reset after commit f07d478090b0
("Bluetooth: Get rid of cmd_timeout and use the reset callback")
Fixes: f07d478090b0 ("Bluetooth: Get rid of cmd_timeout and use the reset callback")
Signed-off-by: Hsin-chen Chuang <chharry@chromium.org>
---
drivers/bluetooth/btusb.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 9aa018d4f6f5..526c1926a407 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -899,11 +899,6 @@ static void btusb_reset(struct hci_dev *hdev)
struct btusb_data *data;
int err;
- if (hdev->reset) {
- hdev->reset(hdev);
- return;
- }
-
data = hci_get_drvdata(hdev);
/* This is not an unbalanced PM reference since the device will reset */
err = usb_autopm_get_interface(data->intf);
--
2.48.0.rc2.279.g1de40edade-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-21 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-20 10:39 [PATCH] Bluetooth: Fix possible infinite recursion of btusb_reset Hsin-chen Chuang
2025-01-21 16:40 ` 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®