All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: b-liu@ti.com, balbi@ti.com, fabio.baltieri@linaro.org,
	linusw@kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] usb: musb: ux500: Fix transceiver leak in ux500_musb_init()
Date: Wed, 16 Sep 2026 18:38:12 +0100	[thread overview]
Message-ID: <2026091648-ozone-opponent-8a42@gregkh> (raw)
In-Reply-To: <20260916165055.2085246-1-vulab@iscas.ac.cn>

On Wed, Sep 16, 2026 at 04:50:55PM +0000, Wentao Liang wrote:
> ux500_musb_init() takes a reference on the USB2 transceiver with
> usb_get_phy() and stores it in musb->xceiv. If the subsequent
> usb_register_notifier() call fails, the function returns without
> releasing the reference, leaking the transceiver. The only place the
> reference is put is ux500_musb_exit(), which is not run when the init
> fails.
> 
> Put the transceiver before returning on the notifier registration
> failure path. The notifier itself does not need to be unregistered
> since usb_register_notifier() failed.
> 
> Fixes: 0135522c4898 ("usb: musb: ux500: add otg notifier support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
>  drivers/usb/musb/ux500.c | 1 +
>  1 file changed, 1 insertion(+)

Again, you need to add an assisted-by tag.  Please go back and fix up
_ALL_ of these to have that.

thanks,

greg k-h

      parent reply	other threads:[~2026-09-16 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 16:50 [PATCH] usb: musb: ux500: Fix transceiver leak in ux500_musb_init() Wentao Liang
2026-09-16 17:33 ` Linus Walleij
2026-09-16 17:38 ` Greg KH [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=2026091648-ozone-opponent-8a42@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=b-liu@ti.com \
    --cc=balbi@ti.com \
    --cc=fabio.baltieri@linaro.org \
    --cc=linusw@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.