Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Myeonghun Pak" <mhun512@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: phy: gpio-vbus: disable VBUS work during removal
Date: Sun, 18 Oct 2026 03:20:57 +0000	[thread overview]
Message-ID: <sashiko-outbox-175904@kernel.org> (raw)
In-Reply-To: <179229341073.3942822.17212567068599854952.gpio-vbus@gmail.com>

> Legacy users such as PXA UDC obtain this PHY through usb_get_phy(),
> which does not create a supplier device link. A sysfs unbind of the PHY
> can therefore run while the gadget consumer remains bound.
> 
> The VBUS IRQ remains registered until devres cleanup, after
> gpio_vbus_remove() returns. With the gadget still registered, an IRQ
> after cancel_delayed_work_sync() returns can queue another instance of
> the delayed work. The 100 ms delay lets devres release the GPIO, OTG and
> driver state before that instance runs.
> 
> Disable and drain the delayed work during removal so late IRQs cannot
> queue it again. This also rejects work queued by set_peripheral(), which
> calls the IRQ handler directly. The managed IRQ is released before the
> GPIO and driver state accessed by its handler are freed.
> 
> This issue was identified as part of our ongoing research while
> reviewing kernel code.
> 
> Fixes: c2344f13b59e ("USB: gpio_vbus: add delayed vbus_session calls")
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/179229341073.3942822.17212567068599854952.gpio-vbus@gmail.com?part=1


      reply	other threads:[~2026-10-18  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18  3:17 [PATCH] usb: phy: gpio-vbus: disable VBUS work during removal Myeonghun Pak
2026-10-18  3:20 ` sashiko-bot [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=sashiko-outbox-175904@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mhun512@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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