drm/amdkfd: Use mmget_not_zero in MMU notifier
authorPhilip Yang <Philip.Yang@amd.com>
Thu, 26 May 2022 20:15:38 +0000 (16:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jun 2022 20:04:41 +0000 (16:04 -0400)
commitfa582c6f3684ac0098a9d02ddf0ed52a02b37127
treef4c75c6396090581ab03b2af4df26baf920f0f36
parent2a460963350ec6b1534d28d7f943b5f84815aff2
drm/amdkfd: Use mmget_not_zero in MMU notifier

MMU notifier callback may pass in mm with mm->mm_users==0 when process
is exiting, use mmget_no_zero to avoid accessing invalid mm in deferred
list work after mm is gone.

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