]> 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)
commit94dab9d6a8cd0624e16c2cd7731885f688e37c67
tree82942545bb1b8d8c488a102dc2d4a43df965ead6
parent5eaf21d979f445fde46fb34dd17309ed575a210a
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: 74e9e30a297c ("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