summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEvgenii Burenchev <evg28bur@yandex.ru>2026-06-29 15:58:50 -0500
committerAlex Deucher <alexander.deucher@amd.com>2026-07-01 11:46:52 -0400
commit98cad4bd1443975d972f4c7f705980da03722a22 (patch)
treef1143c2eaaaebb32152ba9f00df81f09c83d66bc /include
parent27213b776a666d3030de5acc3cd75278197b0494 (diff)
downloadlinux-next-98cad4bd1443975d972f4c7f705980da03722a22.tar.gz
linux-next-98cad4bd1443975d972f4c7f705980da03722a22.zip
drm/amd/display: Fix dangling pointer in plane reset function
amdgpu_dm_plane_drm_plane_reset() frees the old state before allocating a new one. If kzalloc() fails, the function returns without updating the state pointer, leaving a dangling pointer to already freed memory. Fix this by allocating the new state first. On allocation failure, the old state remains untouched and the function safely returns. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5d945cbcd4b1 ("drm/amd/display: Create a file dedicated to planes") Signed-off-by: Evgenii Burenchev <evg28bur@yandex.ru> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20260629090435.9729-3-evg28bur@yandex.ru [adjust for movement around current amd-staging-drm-next] Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions