From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: References: X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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?= 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