public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Maíra Canal <mcanal@igalia.com>
To: Melissa Wen <mwen@igalia.com>,
	Iago Toral Quiroga <itoral@igalia.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: kernel-dev@igalia.com, dri-devel@lists.freedesktop.org,
	Maíra Canal <mcanal@igalia.com>
Subject: [PATCH 0/2] drm/v3d: Fix CPU job teardown bugs
Date: Fri, 15 May 2026 12:07:13 -0300	[thread overview]
Message-ID: <20260515-v3d-cpu-job-leaks-v1-0-7f147cbbf935@igalia.com> (raw)

This series addresses two independent teardown bugs in V3D's CPU job
submission path:

 - PATCH 1: A use-after-free on the ioctl's fail label, where the timestamp
   and performance query arrays are freed through cpu_job after
   v3d_job_cleanup() has already released the job. It consolidates the CPU
   job teardown into the job's kref destructor so a single code path covers
   both the scheduler .free_job and ioctl error paths.

 - PATCH 2: A GEM reference leak on indirect CSD jobs: the extra reference
   taken by v3d_get_cpu_indirect_csd_params() is never released. It adds
   the missing drop in v3d_cpu_job_free().

Claude was the one that identified these teardown bugs, although the fixes
were written by myself. Therefore, an Assisted-by tag was added to the
patches in conformance with the AI Coding Assistants [0] policy.

[0] https://docs.kernel.org/process/coding-assistants.html

Best regards,
- Maíra

---
Maíra Canal (2):
      drm/v3d: Fix use-after-free of CPU job query arrays on error path
      drm/v3d: Release indirect CSD GEM reference on CPU job free

 drivers/gpu/drm/v3d/v3d_sched.c  | 16 +---------------
 drivers/gpu/drm/v3d/v3d_submit.c | 22 +++++++++++++++++++---
 2 files changed, 20 insertions(+), 18 deletions(-)
---
base-commit: 0a9c56dd387605d17dabeedd9fdd2c4c1d0bab7b
change-id: 20260515-v3d-cpu-job-leaks-06c60f2af206


             reply	other threads:[~2026-05-15 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 15:07 Maíra Canal [this message]
2026-05-15 15:07 ` [PATCH 1/2] drm/v3d: Fix use-after-free of CPU job query arrays on error path Maíra Canal
2026-05-15 22:58   ` Claude review: " Claude Code Review Bot
2026-05-15 15:07 ` [PATCH 2/2] drm/v3d: Release indirect CSD GEM reference on CPU job free Maíra Canal
2026-05-15 22:58   ` Claude review: " Claude Code Review Bot
2026-05-15 22:58 ` Claude review: drm/v3d: Fix CPU job teardown bugs Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260515-v3d-cpu-job-leaks-v1-0-7f147cbbf935@igalia.com \
    --to=mcanal@igalia.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=itoral@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=mwen@igalia.com \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox