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/v3d: Fix vaddr leak when indirect CSD has zeroed workgroups Date: Thu, 04 Jun 2026 12:23:39 +1000 Message-ID: In-Reply-To: <20260602-v3d-fix-indirect-csd-v4-1-654309e32bc0@igalia.com> References: <20260602-v3d-fix-indirect-csd-v4-0-654309e32bc0@igalia.com> <20260602-v3d-fix-indirect-csd-v4-1-654309e32bc0@igalia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Status: Good =E2=80=94 correct and minimal fix.** The bug: `v3d_rewrite_csd_job_wg_counts_from_indirect()` maps two BOs via `= v3d_get_bo_vaddr()` at the top, but when any workgroup count is zero, it re= turned early via `return;`, skipping the `v3d_put_bo_vaddr()` cleanup at th= e bottom. This leaks the vaddr mappings. The fix replaces the bare `return` with `goto unmap_bo`, jumping to a label= placed just before the existing cleanup: ```c if (wg_counts[0] =3D=3D 0 || wg_counts[1] =3D=3D 0 || wg_counts[2] =3D=3D = 0) - return; + goto unmap_bo; ``` ```c +unmap_bo: v3d_put_bo_vaddr(indirect); v3d_put_bo_vaddr(bo); ``` This is the obvious correct fix. The `goto` is the standard kernel pattern = for cleanup-on-early-exit. The Fixes tag correctly references the commit th= at introduced the indirect CSD path. Has Iago's Reviewed-by. No issues. --- Generated by Claude Code Patch Reviewer