From: sashiko-bot@kernel.org
To: "Ziheng Wei" <zihengw03@163.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: xhci: drop xhci->lock around pm_runtime calls in test mode
Date: Mon, 30 Nov 2026 13:48:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-241297@kernel.org> (raw)
In-Reply-To: <20261130134211.1412065-1-zihengw03@163.com>
> xhci_enter_test_mode() calls pm_runtime_forbid() and xhci_exit_test_mode()
> calls pm_runtime_allow() while holding the IRQ-safe spinlock xhci->lock.
> Both runtime PM helpers take dev->power.lock with spin_lock_irq() and
> unconditionally re-enable hard IRQs (and pm_runtime_forbid() may also
> sleep via rpm_resume() if the controller is not irq-safe), triggering
> lockdep HARDIRQ-ON-W warnings and potential deadlock.
>
> Drop and reacquire xhci->lock around pm_runtime_forbid() and
> pm_runtime_allow(), matching the existing lock-drop pattern in
> xhci_enter_test_mode().
>
> Found by LLM-assisted static analysis; the xhci_enter_test_mode()
> HARDIRQ-ON-W lockdep warning was reproduced in QEMU with PROVE_LOCKING
> and the fix was compile-tested on x86_64.
>
> Fixes: 0f1d832ed1fb ("usb: xhci: Add port test modes support for usb2.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ziheng Wei <zihengw03@163.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130134211.1412065-1-zihengw03@163.com?part=1
prev parent reply other threads:[~2026-11-30 13:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 13:42 [PATCH v2] usb: xhci: drop xhci->lock around pm_runtime calls in test mode Ziheng Wei
2026-11-30 13:48 ` 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-241297@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zihengw03@163.com \
/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