From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/vc4: Fix memory leak of BO array in hang state Date: Tue, 31 Mar 2026 17:02:00 +1000 Message-ID: In-Reply-To: <20260330-vc4-misc-fixes-v1-2-92defc940a29@igalia.com> References: <20260330-vc4-misc-fixes-v1-0-92defc940a29@igalia.com> <20260330-vc4-misc-fixes-v1-2-92defc940a29@igalia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Verdict: Good fix.** The `state->bo` array is allocated via `kzalloc_objs()` in `vc4_save_hang_state()` but `vc4_free_hang_state()` only freed the individual BO references and the top-level `state` struct, leaking the `bo` array itself. ```c for (i = 0; i < state->user_state.bo_count; i++) drm_gem_object_put(state->bo[i]); +kfree(state->bo); kfree(state); ``` Straightforward and correct. The `kfree(state->bo)` must come after the loop that puts the BO references and before `kfree(state)`. No issues. --- --- Generated by Claude Code Patch Reviewer