All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ziheng Wei" <zihengw03@163.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: drop xhci->lock around pm_runtime calls in test mode
Date: Mon, 30 Nov 2026 10:40:29 +0000	[thread overview]
Message-ID: <sashiko-outbox-240874@kernel.org> (raw)
In-Reply-To: <20261130103455.1384163-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 may sleep 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.")
> Signed-off-by: Ziheng Wei <zihengw03@163.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130103455.1384163-1-zihengw03@163.com?part=1

  reply	other threads:[~2026-11-30 10:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 10:34 [PATCH] usb: xhci: drop xhci->lock around pm_runtime calls in test mode Ziheng Wei
2026-11-30 10:40 ` sashiko-bot [this message]
2026-11-30 11:11 ` Greg Kroah-Hartman

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-240874@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 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.