OSDN Git Service

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 20:10:32 +0000 (15:10 -0500)
commitcda0817b41bdd509c37036c482a60230a5063772
tree9cb4d5c42ab76b2e51ecf8903d784c3925aed58d
parent4d62555f624582e60be416fbc4772cd3fcd12b1a
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