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:34 +1000 [thread overview]
Message-ID: <review-overall-b2d8b281-a8e3-43a7-a4a8-b112526070e2@amd.com> (raw)
In-Reply-To: <b2d8b281-a8e3-43a7-a4a8-b112526070e2@amd.com>
Overall Series Review
Subject: Re: [PATCH] drm/radeon: Use kvfree instead of kfree in radeon_gpu_reset
Author: =?UTF-8?Q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>
Patches: 2
Reviewed: 2026-05-25T19:20:34.793947
---
This is a single-patch fix for a real bug: **`kfree()` used on memory allocated with `kvmalloc_array()`**. The analysis is correct and the fix is appropriate.
In `radeon_ring_backup()` (`radeon_ring.c:325`), ring data is allocated via `kvmalloc_array()`, which may fall back to `vmalloc()` for large allocations. On the success path, `radeon_ring_restore()` already correctly uses `kvfree()` (lines 360, 369). However, on the error/fallback path in `radeon_gpu_reset()` (`radeon_device.c:1803`), `kfree()` is used instead, which would cause memory corruption if `vmalloc()` was the underlying allocator.
The fix is minimal, correct, and appropriate for stable backport. **Recommend: Accept.**
---
Generated by Claude Code Patch Reviewer
next prev 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 Code Review Bot [this message]
2026-05-25 9:20 ` 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-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