https://bugzilla.kernel.org/show_bug.cgi?id=209987
Bug ID: 209987 Summary: Memory leak in amdgpu_dm_update_connector_after_detect Product: Drivers Version: 2.5 Kernel Version: 5.9.1 Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Video(DRI - non Intel) Assignee: drivers_video-dri@kernel-bugs.osdl.org Reporter: lstarnes1024@gmail.com Regression: No
Created attachment 293341 --> https://bugzilla.kernel.org/attachment.cgi?id=293341&action=edit /sys/kernel/debug/kmemleak
It looks like there's a memory leak in drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:amdgpu_dm_update_connector_after_detect. It appears to be calling drm_add_edid_modes, which indirectly calling ito either do_detailed_mode or drm_mode_duplicate.
This has caused me to run out of memory a handful of times, which could only be resolved by rebooting.
I only experienced this after upgrading to 5.9.1, and it looks like commit b24bdc37d03a0478189e20a50286092840f414fa added the call to drm_add_edid_modes in amdgpu_dm_update_connector_after_detect.