From: Johan Hovold <johan@kernel.org>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] USB: usb_wwan: Fix urb leak in usb_wwan_close()
Date: Thu, 17 Sep 2026 11:04:19 +0200 [thread overview]
Message-ID: <aqutE84DMjEPuDT-@hovoldconsulting.com> (raw)
In-Reply-To: <20260916165608.2085613-1-vulab@iscas.ac.cn>
On Wed, Sep 16, 2026 at 04:56:08PM +0000, Wentao Liang wrote:
> usb_wwan_close() drains the delayed write urbs with
> usb_get_from_anchor(), which returns the urb with a new reference
> taken. The loop only clears the busy flag of the urb and never drops
> that reference, so each drained urb keeps one reference forever and
> the urb object is not freed when usb_wwan_port_remove() later drops
> the port's own reference.
>
> Drop the reference with usb_put_urb() once the urb has been found in
> the out_urb array by unbusy_queued_urb(), leaving the reference held
> by the port's preallocated out_urbs array.
>
> Fixes: 79eed03e77d4 ("USB: usb_wwan: fix urb leak at shutdown")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Also looks correct, but again, how was this issue found and fixed?
Johan
prev parent reply other threads:[~2026-09-17 9:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 16:56 Wentao Liang
2026-09-17 9:04 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aqutE84DMjEPuDT-@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®