drm/amdgpu: fix Null pointer dereference error in amdgpu_device_recover_vram
authorHoratio Zhang <Hongkun.Zhang@amd.com>
Mon, 29 May 2023 18:23:37 +0000 (14:23 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 16:34:02 +0000 (12:34 -0400)
commitcbb63eccc05626d0d111b335e44f111a3bb92871
tree2bb74fda1bd4946cb26da70ca386b085a66f442c
parent16cc3a221537bb3588ec2a568d7bd0e7972b25a8
drm/amdgpu: fix Null pointer dereference error in amdgpu_device_recover_vram

Use the function of amdgpu_bo_vm_destroy to handle the resource release
of shadow bo. During the amdgpu_mes_self_test, shadow bo released, but
vmbo->shadow_list was not, which caused a null pointer reference error
in amdgpu_device_recover_vram when GPU reset.

Fixes: 6c032c37ac3e ("drm/amdgpu: Fix vram recover doesn't work after whole GPU reset (v2)")
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Acked-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c