From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-overall-20260604063943.1412955-1-lgs201920130244@gmail.com> (raw)
In-Reply-To: <20260604063943.1412955-1-lgs201920130244@gmail.com>
Overall Series Review
Subject: drm/amdgpu/userq: clean up VA state on create failure
Author: Guangshuo Li <lgs201920130244@gmail.com>
Patches: 1
Reviewed: 2026-06-05T06:43:51.545614
---
**Verdict: The bug this patch tries to fix has already been fixed in drm-next through a larger refactor of `amdgpu_userq_create`.**
This is a single patch addressing a real bug in an older version of the code: when `amdgpu_userq_input_va_validate()` succeeds for one VA but a subsequent validation (or later create step) fails, the VA cursor linked onto `queue->userq_va_list` leaks and `bo_va->userq_va_mapped` remains stale. The analysis in the commit message is correct for the code it targets.
However, the patch is based on an older codebase that has since been substantially 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 calls does not exist in the current tree.
4. The VA validation failure path already goes to `free_fence_drv` (line 662), which unwinds properly.
5. The short-circuit OR expression for VA validation now stores results into `&queue->userq_vas.va.*` output parameters rather than linking a list.
The patch cannot be applied to drm-next and is not needed there — the underlying issue has been addressed as part of the refactoring.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-06-04 20:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 6:39 [PATCH] drm/amdgpu/userq: clean up VA state on create failure Guangshuo Li
2026-06-04 20:43 ` Claude review: " Claude Code Review Bot
2026-06-04 20:43 ` Claude Code Review Bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-overall-20260604063943.1412955-1-lgs201920130244@gmail.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox