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/amdgpu/amdgpu_connectors: Use struct drm_edid
Date: Fri, 13 Feb 2026 16:18:05 +1000	[thread overview]
Message-ID: <review-overall-20260212222029.15777-1-jpeisach@ubuntu.com> (raw)
In-Reply-To: <20260212222029.15777-1-jpeisach@ubuntu.com>

Overall Series Review

Subject: drm/amdgpu/amdgpu_connectors: Use struct drm_edid
Author: Joshua Peisach <jpeisach@ubuntu.com>
Patches: 3
Reviewed: 2026-02-13T16:18:05.671505

---

This two-patch series converts amdgpu connector code from the deprecated `struct edid` type to the newer `struct drm_edid` type, updating all related function calls to use the modern DRM EDID APIs. The conversion is mostly straightforward and follows the established pattern used elsewhere in the DRM subsystem.

The series changes the `amdgpu_connector->edid` field type from `struct edid *` to `const struct drm_edid *`, replaces `drm_get_edid()` calls with `drm_edid_read_ddc()`, replaces `drm_connector_update_edid_property()` with `drm_edid_connector_update()`, and updates audio SAD/speaker allocation code to use `drm_edid_raw()` to access the underlying raw EDID structure. The second patch removes the now-unnecessary `amdgpu_connector_free_edid()` wrapper and calls `drm_edid_free()` directly.

The main concern with this series is a potential use-after-free bug introduced in patch 2. When removing the `amdgpu_connector_free_edid()` wrapper, the patches lose the critical `amdgpu_connector->edid = NULL` assignment that was part of the wrapper. While `drm_edid_free()` safely handles NULL pointers, it does not set the passed pointer to NULL. In several code paths, the EDID is freed but the pointer is left dangling, and the code later checks `if (!amdgpu_connector->edid)` or attempts to use the pointer. This creates a classic use-after-free vulnerability.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-02-13  6:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 22:20 [PATCH 0/2] drm/amdgpu/amdgpu_connectors: Use struct drm_edid Joshua Peisach
2026-02-12 22:20 ` [PATCH 1/2] drm/amdgpu/amdgpu_connectors: use struct drm_edid instead of struct edid Joshua Peisach
2026-02-13  6:24   ` Claude review: " Claude Code Review Bot
2026-02-12 22:20 ` [PATCH 2/2] drm/amdgpu/amdgpu_connectors: remove amdgpu_connector_free_edid Joshua Peisach
2026-02-13  6:24   ` Claude review: " Claude Code Review Bot
2026-02-13  6:18 ` Claude Code Review Bot [this message]

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-20260212222029.15777-1-jpeisach@ubuntu.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