From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: accel/amdxdna: Remove drv_cmd tracing from job free callback
Date: Thu, 04 Jun 2026 16:19:38 +1000 [thread overview]
Message-ID: <review-overall-20260529152837.1973405-1-lizhi.hou@amd.com> (raw)
In-Reply-To: <20260529152837.1973405-1-lizhi.hou@amd.com>
Overall Series Review
Subject: accel/amdxdna: Remove drv_cmd tracing from job free callback
Author: Lizhi Hou <lizhi.hou@amd.com>
Patches: 5
Reviewed: 2026-06-04T16:19:38.908940
---
This is a single-patch fix for a real use-after-free bug in `accel/amdxdna`. The analysis is correct: `job->drv_cmd` points to a caller-owned stack-local `struct amdxdna_drv_cmd` (e.g., the `cmd` variable in `aie2_hwctx_cfg_debug_bo()` at line 907 and `aie2_hwctx_sync_debug_bo()` at line 979). After `amdxdna_cmd_submit()` returns and the calling function finishes, that stack frame is gone — but the job may still be alive in the scheduler and `aie2_sched_job_free()` can run later via the `.free_job` callback, at which point `job->drv_cmd` is a dangling pointer.
The fix is correct and minimal. The patch is straightforward and appropriate for a `Fixes:` tag.
**Verdict: Looks good.** One minor observation below.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-06-04 6:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 15:28 [PATCH V1] accel/amdxdna: Remove drv_cmd tracing from job free callback Lizhi Hou
2026-05-31 14:18 ` Mario Limonciello
2026-06-01 15:18 ` Lizhi Hou
2026-06-03 18:34 ` Mario Limonciello
2026-06-03 20:17 ` Lizhi Hou
2026-06-04 6:19 ` Claude Code Review Bot [this message]
2026-06-04 6:19 ` Claude review: " Claude Code Review Bot
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-20260529152837.1973405-1-lizhi.hou@amd.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