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: replace PASID IDR with XArray Date: Tue, 31 Mar 2026 17:18:18 +1000 Message-ID: In-Reply-To: <20260330113501.25654-1-mikhail.v.gavrilov@gmail.com> References: <20260330113501.25654-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: replace PASID IDR with XArray Author: Mikhail Gavrilov Patches: 2 Reviewed: 2026-03-31T17:18:18.250988 --- This is a single-patch series (v3) that fixes two real locking bugs introduced by commit `8f1de51f49be` in the amdgpu PASID allocator: 1. `GFP_KERNEL` allocation under `spin_lock()` (can sleep) 2. Plain `spin_lock()` used in process context while `amdgpu_pasid_free()` can be called from hardirq context via fence callbacks (deadlock) The approach of replacing IDR+spinlock with XArray is clean and was suggested by the AMD maintainer (Lijo Lazar). XArray provides both built-in cyclic allocation and IRQ-safe internal locking, fixing both bugs in one conversion. The patch is well-motivated, the commit message is excellent with clear documentation of the bugs and call chains, and the v3 changelog shows good iteration based on reviewer feedback. **Verdict: Looks good overall, with one minor nit.** --- Generated by Claude Code Patch Reviewer