diff options
| author | Evgenii Burenchev <evg28bur@yandex.ru> | 2026-06-29 15:58:50 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-07-01 11:46:52 -0400 |
| commit | 98cad4bd1443975d972f4c7f705980da03722a22 (patch) | |
| tree | f1143c2eaaaebb32152ba9f00df81f09c83d66bc /include | |
| parent | 27213b776a666d3030de5acc3cd75278197b0494 (diff) | |
| download | linux-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
