From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260212222029.15777-1-jpeisach@ubuntu.com> References: <20260212222029.15777-1-jpeisach@ubuntu.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/amdgpu/amdgpu_connectors: Use struct drm_edid Author: Joshua Peisach Patches: 3 Reviewed: 2026-02-13T16:18:05.671505 --- This two-patch series converts amdgpu connector code from the deprecated `str= uct edid` type to the newer `struct drm_edid` type, updating all related func= tion calls to use the modern DRM EDID APIs. The conversion is mostly straight= forward and follows the established pattern used elsewhere in the DRM subsyst= em. The series changes the `amdgpu_connector->edid` field type from `struct edid = *` to `const struct drm_edid *`, replaces `drm_get_edid()` calls with `drm_ed= id_read_ddc()`, replaces `drm_connector_update_edid_property()` with `drm_edi= d_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 introduce= d in patch 2. When removing the `amdgpu_connector_free_edid()` wrapper, the p= atches lose the critical `amdgpu_connector->edid =3D NULL` assignment that wa= s 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 i= s freed but the pointer is left dangling, and the code later checks `if (!amd= gpu_connector->edid)` or attempts to use the pointer. This creates a classic = use-after-free vulnerability. --- Generated by Claude Code Patch Reviewer