From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796046492; b=bhvjoiPjWy+XW5vZXASG4SYNw+ndhJKgoPqtkAlGULB7BauHm8RbEWZgovkNTBOaAin1 sjCUM4FsqFXn51LRweIaYIVPCdDnS6qn0eSAFehnDGF5z4G2OoBOwdtYNj+N0jDXsMgOU Eg54RpXGqfmntESeqkQTe1rJsnRlxITpHuq7sh2BCry3IslL1JcjkHcZPCQ557xwpPbb5 AMds/Z8qW2fGDg3tJy5XUpldBhJiP3/Vh7PpW/MVN8Rkrg2IUVzLy5LDf16yhVFhwdzrZ pRKkx1US4DuKfmRXSZkIaqL4Vzlz5AK4GchlZOQ35g+Qq3HruZwQqBTijazrYWFEcJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796046492; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=K7F3i2ptu8jn4cNMKausu7tvynb4ig8+j2zD8Z0NfXo=; b=EIg2bhzA5r0db8gZcI2Zv7gP12QL67i52h5c4GrT+RXgiUIBJm5GfVx8sZJ16u9+WS2p tBRsMXWr3IOM4wkhmXnWWKV819JV2RVQ1YZe/MuJ5bKU5zQKZ5LJOK4Ir4MnXBrzGoIjH Zu9yZOLS7qhRfuy7IYDll+PQBz5pgJO7wgCR/kiBlOyzvaRNmHpJ8ty+DiY9y3xKpMo4O 53Z2bU5VlwjYmWcTUNeSOX5AC7qg4WLdZV/S1RiuyGdiXG0x1IsSLlSy8nw3LwvYKIPxg RAba338T+if/GEKlD7AMqPvf4+1mTvy3bnAcVJiPn7/N71WKC39cF7iItaXYsRyP4QA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BOI57oTC; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03B70606A31C for ; Mon, 30 Nov 2026 13:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BOI57oTC Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54E181F0089F; Mon, 30 Nov 2026 13:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796046491; bh=K7F3i2ptu8jn4cNMKausu7tvynb4ig8+j2zD8Z0NfXo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=BOI57oTCS5J427zTG55bj1SnYzFGac5NsLg33qGvBA2bfQjCMNDSJ+pzisdY561wW Qj1Qo2tvGsHmS3Qy4K8pd9V+3RERdolMuqOpKxDN2obucW0Qe3JNiUWXaBFvnTkALY Px3lKdVpGXfZexdbpo0MT+go5+Y/MsdrFDb57t2hdH50qpQfal/HVzY2CLZS1xuCwT ks+E7jqKHqrsxEph9JQxByeqiO43YbTaIE34yYGJS6UwaF3j59g5rZE+vrd+2Jx85x 7SIRB2+uzUrUk0gMqOsE12SwM3JQ7YW0BxF4dbOkz5+6ShWF/0CXUftYrsMS/8uPUI /6//FoAZk0Otg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] usb: xhci: drop xhci->lock around pm_runtime calls in test mode Reply-To: sashiko-reviews@lists.linux.dev To: "Ziheng Wei" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261130134211.1412065-1-zihengw03@163.com> References: <20261130134211.1412065-1-zihengw03@163.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Nov 2026 13:48:10 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > 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. >=20 > Drop and reacquire xhci->lock around pm_runtime_forbid() and > pm_runtime_allow(), matching the existing lock-drop pattern in > xhci_enter_test_mode(). >=20 > 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. >=20 > Fixes: 0f1d832ed1fb ("usb: xhci: Add port test modes support for usb2.") > Cc: stable@vger.kernel.org > Signed-off-by: Ziheng Wei Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261130134211.1412= 065-1-zihengw03@163.com?part=3D1