]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix a potential memory leak in amdgpu_device_fini_sw()
authorLang Yu <lang.yu@amd.com>
Thu, 21 Oct 2021 06:36:36 +0000 (14:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Oct 2021 18:26:12 +0000 (14:26 -0400)
commit6b210b5fcbce12c4a0fbba0795c1d16343e965d4
tree82942545bb1b8d8c488a102dc2d4a43df965ead6
parentcde1114944f5ac74bcd86fcd42e9abe53736e562
drm/amdgpu: fix a potential memory leak in amdgpu_device_fini_sw()

amdgpu_fence_driver_sw_fini() should be executed before
amdgpu_device_ip_fini(), otherwise fence driver resource
won't be properly freed as adev->rings have been tore down.

Fixes: 968997c45eba ("drm/amdgpu: Split amdgpu_device_fini into early and late")
Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c