public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH] drm/radeon: Use kvfree instead of kfree in radeon_gpu_reset
Date: Mon, 25 May 2026 19:20:35 +1000	[thread overview]
Message-ID: <review-patch1-b2d8b281-a8e3-43a7-a4a8-b112526070e2@amd.com> (raw)
In-Reply-To: <b2d8b281-a8e3-43a7-a4a8-b112526070e2@amd.com>

Patch Review

**Verdict: Correct fix, should be applied.**

The allocation in `radeon_ring_backup()`:
```c
*data = kvmalloc_array(size, sizeof(uint32_t), GFP_KERNEL);
```

The two free paths in `radeon_ring_restore()` already use `kvfree()`:
```c
kvfree(data);  /* line 360, on ring lock failure */
kvfree(data);  /* line 369, after successful restore */
```

But the error path in `radeon_gpu_reset()` uses the wrong free:
```c
} else {
    radeon_fence_driver_force_completion(rdev, i);
    kfree(ring_data[i]);  /* BUG: should be kvfree() */
}
```

The fix correctly changes this to `kvfree(ring_data[i])`, which safely handles both `kmalloc` and `vmalloc` backed allocations.

**Minor nits on the commit message (non-blocking):**
- The Fixes tag references `2098105ec65c ("drm: drop drm_[cm]alloc* helpers")`. This is the commit that introduced `kvmalloc_array` in `radeon_ring_backup` but left the `kfree` in `radeon_gpu_reset`, so the Fixes tag is appropriate.
- The commit message is well-written and clearly explains the provenance of the bug and testing limitations.
- The dual Signed-off-by chain (Zilin Guan found, Dawei Feng sent) is fine.

**No other issues.** The patch is a one-line, obviously correct fix with a clear allocation/free mismatch. Good candidate for stable.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-05-25  9:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22  3:32 [PATCH] drm/radeon: Use kvfree instead of kfree in radeon_gpu_reset Dawei Feng
2026-05-22  7:37 ` Christian König
2026-05-25  9:20   ` Claude review: " Claude Code Review Bot
2026-05-25  9:20   ` 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-patch1-b2d8b281-a8e3-43a7-a4a8-b112526070e2@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