drm/amdkfd: Ensure mm remain valid in svm deferred_list work
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 18 Jan 2022 17:15:24 +0000 (12:15 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jan 2022 20:47:51 +0000 (15:47 -0500)
commit367c9b0f1b8750a704070e7ae85234d591290434
tree5f2eb8a4e427c5710f2a41a68f55071636e083e9
parentac7c48c0cce00d03b3c95fddcccb0a45257e33e3
drm/amdkfd: Ensure mm remain valid in svm deferred_list work

svm_deferred_list work should continue to handle deferred_range_list
which maybe split to child range to avoid child range leak, and remove
ranges mmu interval notifier to avoid mm mm_count leak. So taking mm
reference when adding range to deferred list, to ensure mm is valid in
the scheduled deferred_list_work, and drop the mm referrence after range
is handled.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reported-by: Ruili Ji <ruili.ji@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