On Sat Apr 11, 2026 at 1:30 AM EDT, SRINIVASAN SHANMUGAM wrote:
I went through the code path, and the warning looks valid: In amdgpu_connector_dvi_detect(), we do: drm_edid_free(amdgpu_connector->edid); After that, we call: amdgpu_connector_get_edid(connector); But inside amdgpu_connector_get_edid(): It immediately returns if amdgpu_connector->edid is non-NULL Since we did not set amdgpu_connector->edid = NULL after freeing: The pointer is still non-NULL (but already freed) So amdgpu_connector_get_edid() becomes a no-op No new EDID is read Then later we do: drm_edid_is_digital(amdgpu_connector->edid); At this point: amdgpu_connector->edid still points to freed memory So this becomes a real use-after-free So the issue is not just the removal of amdgpu_connector_free_edid(), but that we lost the behavior of clearing the cached EDID pointer after free. Because of this, the EDID cache logic breaks. About reverting: Reverting the commit would fix it indirectly But I think a minimal fix is better: Set amdgpu_connector->edid = NULL after drm_edid_free() This keeps the current design intact and fixes the bug cleanly.
I like it - less is more :) and it also makes it clear that the pointer is set to NULL, instead of being hidden behind a function. -Josh
