From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/amdgpu: fix locking issues in PASID IDR management Date: Tue, 31 Mar 2026 17:36:41 +1000 Message-ID: In-Reply-To: <20260330053025.19203-1-mikhail.v.gavrilov@gmail.com> References: <20260330053025.19203-1-mikhail.v.gavrilov@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: drm/amdgpu: fix locking issues in PASID IDR management Author: Mikhail Gavrilov Patches: 3 Reviewed: 2026-03-31T17:36:41.530736 --- This is a well-structured 2-patch series fixing two real locking bugs introduced by commit `14b81abe7bdc` / `8f1de51f49be` ("drm/amdgpu: prevent immediate PASID reuse case"), which converted PASID allocation from IDA to IDR with a spinlock. The two bugs are: 1. **Sleeping under spinlock**: `idr_alloc_cyclic()` called with `GFP_KERNEL` inside `spin_lock()`. 2. **IRQ deadlock**: `amdgpu_pasid_free()` reachable from hardirq context (fence signal path) but the lock taken with plain `spin_lock()` in process context. Both fixes use well-established kernel patterns. The patches are correctly ordered (patch 1 is a prerequisite for patch 2, as patch 2 builds on the code introduced by patch 1). The cover letter is excellent with clear problem description, call chain, and test details. **Verdict: Series looks correct and ready to apply.** One minor nit on patch 2 below. --- --- Generated by Claude Code Patch Reviewer