Linux USB
 help / color / mirror / Atom feed
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, oliver@neukum.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] USB: sierra: Fix urb leak in sierra_submit_delayed_urbs()
Date: Thu, 17 Sep 2026 11:00:54 +0200	[thread overview]
Message-ID: <aqusRqksylvOi1UK@hovoldconsulting.com> (raw)
In-Reply-To: <20260916165352.2085480-1-vulab@iscas.ac.cn>

On Wed, Sep 16, 2026 at 04:53:52PM +0000, Wentao Liang wrote:
> sierra_submit_delayed_urbs() takes a reference to each delayed urb
> with usb_get_from_anchor() before submitting it. The submit failure
> path releases the reference with usb_free_urb(), but on the success
> path the reference is never dropped: the urb is only anchored in the
> active list and the USB core unanchors it on completion, leaving the
> reference returned by usb_get_from_anchor() dangling so the urb
> object is never freed.
> 
> Drop the reference with usb_put_urb() after a successful submission,
> matching the reference handling in sierra_write() and the sierra_close()
> drain loop. Skip the rest of the loop body with continue on the error
> path, which already frees the urb.
> 
> Fixes: e6929a9020ac ("USB: support for autosuspend in sierra while online")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

This looks correct, but as Greg already asked you elsewhere, did you
forget to add an Assisted-by tag here as well? How was this issue found
and fixed?

Also, you need to start replying to feedback. According to the list
archives you have haven't replied to any of the four mails commenting on
your patches that I've sent you so far.

Johan

  reply	other threads:[~2026-09-17  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 16:53 [PATCH] USB: sierra: Fix urb leak in sierra_submit_delayed_urbs() Wentao Liang
2026-09-17  9:00 ` Johan Hovold [this message]
2026-10-09 12:40   ` Johan Hovold

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=aqusRqksylvOi1UK@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.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