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, mjg@redhat.com,
stable@vger.kernel.org
Subject: Re: [PATCH] USB: usb_wwan: Fix urb leak in usb_wwan_submit_delayed_urbs()
Date: Thu, 17 Sep 2026 11:06:14 +0200 [thread overview]
Message-ID: <aquthjH6E8DQCzg1@hovoldconsulting.com> (raw)
In-Reply-To: <20260916165846.2085791-1-vulab@iscas.ac.cn>
On Wed, Sep 16, 2026 at 04:58:46PM +0000, Wentao Liang wrote:
> usb_wwan_submit_delayed_urbs() takes a reference to each delayed urb
> with usb_get_from_anchor() before submitting it. The reference is
> never dropped, neither when the submission succeeds nor when it fails,
> so the submit-delayed urbs keep one reference forever and the urb
> objects are not freed when usb_wwan_port_remove() later drops the
> port's own reference. The urbs are not anchored in this path, so the
> USB core cannot drop a reference on completion either.
>
> Drop the reference with usb_put_urb() on both the submission failure
> and the success path. The urb stays valid afterwards because the
> port's preallocated out_urbs array keeps its own reference, which
> matches how usb_wwan_write() submits the same urbs outside of
> suspend.
>
> Fixes: 0d4561947b8d ("usb serial: Add generic USB wwan support")
> 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:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 16:58 Wentao Liang
2026-09-17 9:06 ` 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=aquthjH6E8DQCzg1@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mjg@redhat.com \
--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®