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:35 +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 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