* [PATCH] USB: serial: usb_wwan: fix urb leak on disconnect
@ 2026-10-09 12:32 Johan Hovold
2026-10-09 12:52 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2026-10-09 12:32 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-usb, linux-kernel, Wentao Liang, stable, Oliver Neukum
Make sure to drop the reference taken by usb_anchor_urb() when removing
URBs from the delayed URB anchor to prevent them from leaking when the
device is later disconnected.
Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver")
Reported-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/20260916165608.2085613-1-vulab@iscas.ac.cn
Cc: stable@vger.kernel.org # 2.6.32
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/usb_wwan.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index a183cc4515ed..6beb4062bda3 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -401,6 +401,7 @@ void usb_wwan_close(struct usb_serial_port *port)
urb = usb_get_from_anchor(&portdata->delayed);
if (!urb)
break;
+ usb_put_urb(urb);
unbusy_queued_urb(urb, portdata);
usb_autopm_put_interface_async(serial->interface);
}
@@ -578,6 +579,8 @@ static int usb_wwan_submit_delayed_urbs(struct usb_serial_port *port)
if (!urb)
break;
+ usb_put_urb(urb);
+
err = usb_submit_urb(urb, GFP_ATOMIC);
if (err) {
dev_err(&port->dev, "%s: submit urb failed: %d\n",
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] USB: serial: usb_wwan: fix urb leak on disconnect
2026-10-09 12:32 [PATCH] USB: serial: usb_wwan: fix urb leak on disconnect Johan Hovold
@ 2026-10-09 12:52 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-10-09 12:52 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-usb
> Make sure to drop the reference taken by usb_anchor_urb() when removing
> URBs from the delayed URB anchor to prevent them from leaking when the
> device is later disconnected.
>
> Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver")
> Reported-by: Wentao Liang <vulab@iscas.ac.cn>
> Link: https://lore.kernel.org/20260916165608.2085613-1-vulab@iscas.ac.cn
> Cc: stable@vger.kernel.org # 2.6.32
> Cc: Oliver Neukum <oliver@neukum.org>
> Signed-off-by: Johan Hovold <johan@kernel.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261009123242.464956-1-johan@kernel.org?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-09 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 12:32 [PATCH] USB: serial: usb_wwan: fix urb leak on disconnect Johan Hovold
2026-10-09 12:52 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox