Skip to content

Commit 6eb6e5a

Browse files
committed
drm/v3d: Release indirect CSD GEM reference on CPU job free
v3d_get_cpu_indirect_csd_params() takes a reference to the indirect BO via drm_gem_object_lookup() and stashes it in cpu_job->indirect_csd.indirect, but nothing on the CPU job teardown path ever drops that reference. Drop the extra reference in v3d_cpu_job_free(). The NULL check covers ioctl errors before the lookup ran and CPU job types other than V3D_CPU_JOB_TYPE_INDIRECT_CSD, which leave the field zero-initialised. Cc: stable@vger.kernel.org Fixes: 18b8413 ("drm/v3d: Create a CPU job extension for a indirect CSD job") Assisted-by: Claude:claude-opus-4.7 Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Link: https://patch.msgid.link/20260515-v3d-cpu-job-leaks-v1-2-7f147cbbf935@igalia.com Signed-off-by: Maíra Canal <mcanal@igalia.com>
1 parent b0fe80c commit 6eb6e5a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/gpu/drm/v3d/v3d_submit.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ v3d_cpu_job_free(struct kref *ref)
135135
v3d_performance_query_info_free(&job->performance_query,
136136
job->performance_query.count);
137137

138+
if (job->indirect_csd.indirect)
139+
drm_gem_object_put(job->indirect_csd.indirect);
140+
138141
v3d_job_free(ref);
139142
}
140143

0 commit comments

Comments
 (0)