drm/amdkfd: process exit and retry fault race
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 16 Nov 2021 16:45:32 +0000 (11:45 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Nov 2021 19:06:53 +0000 (14:06 -0500)
commita0c55ecee10055901c9c1b46d0d129cb6b51fa5d
tree5b366c8decab44e08290c75de3ac043aa0c7a4bf
parent514f4a99c7a1b635f7336a6e4732e6fe3ec972a9
drm/amdkfd: process exit and retry fault race

kfd_process_wq_release drain retry fault to ensure no retry fault comes
after removing kfd process from the hash table, otherwise svm page fault
handler will fail to recover the fault and dump GPU vm fault log.

Refactor deferred list work to get_task_mm and take mmap write lock
to handle all ranges, and avoid mm is gone while inserting mmu notifier.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c