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: Release indirect CSD GEM reference on CPU job free Date: Sat, 16 May 2026 08:58:37 +1000 Message-ID: In-Reply-To: <20260515-v3d-cpu-job-leaks-v1-2-7f147cbbf935@igalia.com> References: <20260515-v3d-cpu-job-leaks-v1-0-7f147cbbf935@igalia.com> <20260515-v3d-cpu-job-leaks-v1-2-7f147cbbf935@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 **Analysis of the bug:** `v3d_get_cpu_indirect_csd_params()` calls `drm_gem= _object_lookup()` at `v3d_submit.c:497`: ```c info->indirect =3D drm_gem_object_lookup(file_priv, indirect_csd.indirect); ``` `drm_gem_object_lookup()` takes a reference on the GEM object, but nowhere = in the teardown path was `drm_gem_object_put()` called to release it. This = is a straightforward reference leak. **Fix:** ```c if (job->indirect_csd.indirect) drm_gem_object_put(job->indirect_csd.indirect); ``` The NULL check is appropriate: for non-indirect-CSD job types, `indirect_cs= d.indirect` will be zero-initialized (the job struct is allocated with `kca= lloc` in `v3d_job_allocate`). It also covers the case where `v3d_job_init()= ` fails before the extension parsing reaches the indirect CSD path. The placement in `v3d_cpu_job_free()` (the kref destructor from patch 1) is= the right spot =E2=80=94 it ensures the reference is dropped on both the s= cheduler path and the ioctl error path. **No issues found.** Clean and correct. --- Generated by Claude Code Patch Reviewer