]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix use after free during BO move
authorChristian König <christian.koenig@amd.com>
Tue, 7 Sep 2021 07:37:52 +0000 (09:37 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Sep 2021 20:17:39 +0000 (16:17 -0400)
commitd75b472c4c0a22e4ec4ee932f88903e475085687
tree250689ad5c17c6600c9def8a0afaf87132348db7
parent5abf60198863582ff5d0292c12e2d1846c186f49
drm/amdgpu: fix use after free during BO move

The memory backing old_mem is already freed at that point, move the
check a bit more up.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 1a4b81a41099 ("drm/ttm: allocate resource object instead of embedding it v2")
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1699
Acked-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c