From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74BBC43E4AC; Tue, 21 Jul 2026 21:58:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784671136; cv=none; b=fLjnVYEmufjO8VtlTKCPjL1eqsOcteOZo6oumf+xhFPilK2+jQhiFDsAS9G6dwqehSDVyIPDc9fFOoNPd9H2/RIzSvOr6ggDezTRzaneBprtR4dbd1AvI+S7IMtXK97hMyKNmnJj03y4NncGZxvyzrNzFr2I2ZZotvqRMbjf6gg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784671136; c=relaxed/simple; bh=xai8/H/31jwKqYFsgdo41nlvxcLkis4sPYn8hnYd2k8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q3pMneOFfgee0C7TzUKC9KsUlG5hyG94qMQxNZ/j27hQs4R3laRvjG0y15FNmGb6K6tdRGvv6h5aXDUDD0HFwUhtqZYX6H/cSfJgrRabLOhBHwYUPmCZINVRlGV0QXnzFC5ulqZFfxuIqrbDtQJDF+Oh2b2feqxwkjCb8448ye0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=11wnVpvU; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="11wnVpvU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8F291F000E9; Tue, 21 Jul 2026 21:58:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784671135; bh=xxplWPVWFx2+9rZyK/a215G8tf1nQTCu+el3cq9UQGc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=11wnVpvU+4IUgHLhVFNvsPmOzjk55XDf+sUL4lEbj3ayKhCbDO58lBpvk4y1zCifa A91k17luZ4YfzQ1lD3Q/A1yk/uOjsbWqDMqDq+S5h5alzkpZy0TyrBIIJB/EKhKpKU sqt9/G1iVkyKkD7Jb5eq7Tw08DXXX3iP2Gv8gDS4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rajat Jain , Johan Hovold , Luiz Augusto von Dentz Subject: [PATCH 5.15 078/843] Bluetooth: btusb: fix wakeup source leak on probe failure Date: Tue, 21 Jul 2026 17:15:13 +0200 Message-ID: <20260721152407.753390068@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152405.946368001@linuxfoundation.org> References: <20260721152405.946368001@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold commit 3d93e1bb0fb881fe3ef961d1120556658e9cac4d upstream. Make sure to disable wakeup on probe failure to avoid leaking the wakeup source. Fixes: fd913ef7ce61 ("Bluetooth: btusb: Add out-of-band wakeup support") Cc: stable@vger.kernel.org # 4.11 Cc: Rajat Jain Signed-off-by: Johan Hovold Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Greg Kroah-Hartman --- drivers/bluetooth/btusb.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3196,6 +3196,11 @@ static int marvell_config_oob_wake(struc return 0; } +#else +static inline int marvell_config_oob_wake(struct hci_dev *hdev) +{ + return 0; +} #endif static int btusb_set_bdaddr_marvell(struct hci_dev *hdev, @@ -3725,6 +3730,11 @@ static int btusb_config_oob_wake(struct bt_dev_info(hdev, "OOB Wake-on-BT configured at IRQ %u", irq); return 0; } +#else +static inline int btusb_config_oob_wake(struct hci_dev *hdev) +{ + return 0; +} #endif static void btusb_check_needs_reset_resume(struct usb_interface *intf) @@ -3900,7 +3910,6 @@ static int btusb_probe(struct usb_interf hdev->notify = btusb_notify; hdev->prevent_wake = btusb_prevent_wake; -#ifdef CONFIG_PM err = btusb_config_oob_wake(hdev); if (err) goto out_free_dev; @@ -3909,9 +3918,9 @@ static int btusb_probe(struct usb_interf if (id->driver_info & BTUSB_MARVELL && data->oob_wake_irq) { err = marvell_config_oob_wake(hdev); if (err) - goto out_free_dev; + goto err_disable_wakeup; } -#endif + if (id->driver_info & BTUSB_CW6622) set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks); @@ -4125,6 +4134,9 @@ err_release_siblings: } err_kill_tx_urbs: usb_kill_anchored_urbs(&data->tx_anchor); +err_disable_wakeup: + if (data->oob_wake_irq) + device_init_wakeup(&data->udev->dev, false); out_free_dev: if (data->reset_gpio) gpiod_put(data->reset_gpio);