Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: shadow in shadow_list without tbo.mem.start cause page fault in sriov TDR

shadow was added into shadow_list by amdgpu_bo_create_shadow.
meanwhile, shadow->tbo.mem was not fully configured.
tbo.mem would be fully configured by amdgpu_vm_sdma_map_table until calling amdgpu_vm_clear_bo.
If sriov TDR occurred between amdgpu_bo_create_shadow and amdgpu_vm_sdma_map_table,
amdgpu_device_recover_vram would deal with shadow without tbo.mem.start.

Signed-off-by: Wentao Lou <Wentao.Lou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

wentalou and committed by
Alex Deucher
b575f10d f4bbebf8

+1
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 3165 3165 3166 3166 /* No need to recover an evicted BO */ 3167 3167 if (shadow->tbo.mem.mem_type != TTM_PL_TT || 3168 + shadow->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET || 3168 3169 shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM) 3169 3170 continue; 3170 3171