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/userq: clean up VA state on create failure Date: Fri, 05 Jun 2026 06:43:51 +1000 Message-ID: In-Reply-To: <20260604063943.1412955-1-lgs201920130244@gmail.com> References: <20260604063943.1412955-1-lgs201920130244@gmail.com> 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/amdgpu/userq: clean up VA state on create failure Author: Guangshuo Li Patches: 1 Reviewed: 2026-06-05T06:43:51.545614 --- **Verdict: The bug this patch tries to fix has already been fixed in drm-ne= xt through a larger refactor of `amdgpu_userq_create`.** This is a single patch addressing a real bug in an older version of the cod= e: when `amdgpu_userq_input_va_validate()` succeeds for one VA but a subseq= uent validation (or later create step) fails, the VA cursor linked onto `qu= eue->userq_va_list` leaks and `bo_va->userq_va_mapped` remains stale. The a= nalysis in the commit message is correct for the code it targets. However, the patch is based on an older codebase that has since been substa= ntially reworked on drm-next. The current tree (as of drm-next) shows: 1. `amdgpu_userq_create()` has already been restructured with proper unwind= labels (`free_queue`, `free_fence_drv`, `clean_doorbell_bo`, `clean_mqd`, = `erase_doorbell`). 2. The `userq_va_list` mechanism referenced by the patch no longer exists. = VA tracking now uses a `userq_vas.va_array` union and the `userq_va_mapped`= flag directly on `bo_va`. 3. The function `amdgpu_userq_buffer_vas_list_cleanup()` that the patch cal= ls does not exist in the current tree. 4. The VA validation failure path already goes to `free_fence_drv` (line 66= 2), which unwinds properly. 5. The short-circuit OR expression for VA validation now stores results int= o `&queue->userq_vas.va.*` output parameters rather than linking a list. The patch cannot be applied to drm-next and is not needed there =E2=80=94 t= he underlying issue has been addressed as part of the refactoring. --- Generated by Claude Code Patch Reviewer