Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Keisuke Tsukuda" <tkdkei@outlook.jp>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] usb: dwc3: apple: unregister role switch before taking lock
Date: Tue, 17 Nov 2026 13:12:25 +0000	[thread overview]
Message-ID: <sashiko-outbox-218845@kernel.org> (raw)
In-Reply-To: <20261117125825.27629-2-tkdkei@outlook.jp>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] usb: dwc3: apple: missing Fixes trailer for dwc3_apple_remove()
  lock fix
--

commit 96c6a6a050705a0ebc8be7bb5bb8a9f2787d72a7
Author: Keisuke Tsukuda <tkdkei@outlook.jp>

> usb: dwc3: apple: unregister role switch before taking lock
>
> The Apple DWC3 role-switch callbacks take appledwc->lock while the
> role-switch core holds sw->lock. The core needs to take sw->lock during
> unregister to wait for callbacks. With the current remove order, this
> would invert the locks: remove would hold appledwc->lock and wait for
> sw->lock, while a callback could hold sw->lock and wait for
> appledwc->lock.
>
> Unregister the role switch before taking appledwc->lock. This lets the
> core wait for callbacks before the device is torn down, without creating
> a lock inversion when the role-switch core change is applied.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Keisuke Tsukuda <tkdkei@outlook.jp>

[Severity: Low]
This fixes the lock ordering in dwc3_apple_remove() and carries a stable
tag.  Should this include:

  Fixes: 0ec946d32ef7 ("usb: dwc3: Add Apple Silicon DWC3 glue layer driver")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117125825.27629-1-tkdkei@outlook.jp?part=1

  reply	other threads:[~2026-11-17 13:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 12:59 [PATCH v2 0/2] usb: roles: wait for callbacks during unregister Keisuke Tsukuda
2026-11-17 13:00 ` [PATCH v2 1/2] usb: dwc3: apple: unregister role switch before taking lock Keisuke Tsukuda
2026-11-17 13:12   ` sashiko-bot [this message]
2026-11-17 13:00 ` [PATCH v2 2/2] usb: roles: wait for callbacks on unregister Keisuke Tsukuda
2026-11-17 13:19   ` sashiko-bot

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-218845@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tkdkei@outlook.jp \
    /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