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/imagination: acquire vm_ctx->lock before mapping memory to GPU VM Date: Thu, 23 Apr 2026 08:12:42 +1000 Message-ID: In-Reply-To: <20260421175748.1989002-1-zhengxingda@iscas.ac.cn> References: <20260421175748.1989002-1-zhengxingda@iscas.ac.cn> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/imagination: acquire vm_ctx->lock before mapping memory to GPU= VM Author: Icenowy Zheng Patches: 1 Reviewed: 2026-04-23T08:12:42.085445 --- This is a single-patch fix for a race condition in the PowerVR (Imagination= ) GPU driver where `pvr_vm_map()` can concurrently modify the GPUVM data st= ructure while `drm_gpuva_find*()` is searching it, leading to NULL derefere= nces. The motivation is sound =E2=80=94 looking at `pvr_vm_unmap()` (line 8= 65) and `pvr_vm_unmap_all()` (line 891), both already hold `vm_ctx->lock` a= round their GPUVM operations, so `pvr_vm_map()` needs to do the same. **However, the patch as written has a critical double-unlock bug on the suc= cess path** and must not be applied in its current form. --- Generated by Claude Code Patch Reviewer