drm/amdkfd: Fix an issue at userptr buffer validation process.
authorXiaogang Chen <Xiaogang.Chen@amd.com>
Fri, 21 Apr 2023 18:35:01 +0000 (13:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 24 Apr 2023 22:36:31 +0000 (18:36 -0400)
commit3af470cbcc9f40e47fe9b16882f60cd20b438095
tree8bf58ebeb0b75fc0a8a22e3a742a77bb4783654e
parent9fa8cc0c444562fa19e20ca20f1c70e15b9d8c13
drm/amdkfd: Fix an issue at userptr buffer validation process.

amdgpu_ttm_tt_get_user_pages can fail(-EFAULT). If it failed mem has no associated
hmm range or user_pages associated. Keep it at process_info->userptr_inval_list and
mark mem->invalid until following scheduled attempts can valid it.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c