public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/sched: fix NULL deref when logging missing entity runqueue
Date: Thu, 04 Jun 2026 11:58:59 +1000	[thread overview]
Message-ID: <review-overall-20260603025636.1301481-1-candice.li@amd.com> (raw)
In-Reply-To: <20260603025636.1301481-1-candice.li@amd.com>

Overall Series Review

Subject: drm/sched: fix NULL deref when logging missing entity runqueue
Author: Candice Li <candice.li@amd.com>
Patches: 5
Reviewed: 2026-06-04T11:58:59.136755

---

This is a single-patch fix for a real NULL pointer dereference in `drm_sched_job_init()`. The analysis is correct: `job->sched` is not initialized until `drm_sched_job_arm()` (line 653), and furthermore `drm_sched_job_init()` itself `memset(job, 0, ...)` at line 611 — but that memset happens *after* the `entity->rq` check, so at the point of the `dev_err()` call, `job->sched` is whatever garbage the caller passed in (uninitialized memory). Dereferencing `job->sched->dev` is a guaranteed NULL or wild-pointer dereference.

The fix is correct in substance. One minor style concern below.

**Verdict: The fix is correct and should be applied, with a minor nit on the log format.**

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-06-04  1:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  2:56 [PATCH] drm/sched: fix NULL deref when logging missing entity runqueue Candice Li
2026-06-03  5:58 ` Tvrtko Ursulin
2026-06-03  7:00 ` Christian König
2026-06-03  7:06   ` Philipp Stanner
2026-06-03  7:10     ` Philipp Stanner
2026-06-04  1:58 ` Claude Code Review Bot [this message]
2026-06-04  1:58 ` Claude review: " 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=review-overall-20260603025636.1301481-1-candice.li@amd.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /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