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/connector: check if destroy function exist
Date: Mon, 25 May 2026 20:21:15 +1000	[thread overview]
Message-ID: <review-overall-20260521103329.140064-1-andreas@kemnade.info> (raw)
In-Reply-To: <20260521103329.140064-1-andreas@kemnade.info>

Overall Series Review

Subject: drm/connector: check if destroy function exist
Author: Andreas Kemnade <andreas@kemnade.info>
Patches: 1
Reviewed: 2026-05-25T20:21:15.327783

---

This is a single-patch fix for a NULL function pointer dereference in `drm_connector_free()` and `drm_connector_free_work_fn()`. The fix is correct and necessary. Connectors initialized via `drmm_connector_init()` are explicitly required to have `.destroy = NULL` (enforced by a `drm_WARN_ON` check at `drm_connector.c:533`), yet the `drm_connector_free` and `drm_connector_free_work_fn` paths unconditionally call `connector->funcs->destroy(connector)` without a NULL check. This can lead to a kernel oops when a `drmm`-managed connector's refcount drops to zero.

The fix is minimal, correct in scope, and targets the right locations. The referenced `Fixes:` tag (`c12907be57b1`) makes sense — that's when `drm_bridge_connector` was switched to `drmm` allocations, which would have introduced the possibility of reaching this code with a NULL `.destroy`.

**Verdict: Patch looks good. Recommend acceptance.**

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-25 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 10:33 [PATCH] drm/connector: check if destroy function exist Andreas Kemnade
2026-05-25 10:21 ` Claude Code Review Bot [this message]
2026-05-25 10:21 ` 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-20260521103329.140064-1-andreas@kemnade.info \
    --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