diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2016-01-14 00:35:08 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-16 17:17:14 -0500 |
commit | fa5b5000308136ad61a33126d8ad380cf1fef016 (patch) | |
tree | efe50fcd92ab123100bc50ad0e6e62475b0d7316 | |
parent | 477d9f0ea6ef6c1501b32434dc06ce3fbbf9c200 (diff) |
drm/amdgpu: Fix race condition in MMU notifier release
The release notifier can get called a second time from
mmu_notifier_unregister depending on a race between
__mmu_notifier_release and amdgpu_mn_destroy. Use
mmu_notifier_unregister_no_release to avoid this.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c index 61f0e3c3172a..1b2105ca5af1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | |||
@@ -86,7 +86,7 @@ static void amdgpu_mn_destroy(struct work_struct *work) | |||
86 | } | 86 | } |
87 | mutex_unlock(&adev->mn_lock); | 87 | mutex_unlock(&adev->mn_lock); |
88 | up_write(&rmn->mm->mmap_sem); | 88 | up_write(&rmn->mm->mmap_sem); |
89 | mmu_notifier_unregister(&rmn->mn, rmn->mm); | 89 | mmu_notifier_unregister_no_release(&rmn->mn, rmn->mm); |
90 | kfree(rmn); | 90 | kfree(rmn); |
91 | } | 91 | } |
92 | 92 | ||