diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-06-28 14:19:53 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-29 15:58:09 -0400 |
commit | 65e4f3de094ac286d981bceed832d97738556655 (patch) | |
tree | f40d62ca5edb72ce9e8de060005dd158269012bb | |
parent | 0aee2bc9fb763161588b21ba081e36fd6a4274e2 (diff) |
gpu: nvgpu: Move the unlock in nvgpu_vm_area_free again
Move the lock release to cover the g->ops.mm.gmmu_unmap() call
as well since this too must be called under the VM lock.
Bug 2156667
Change-Id: I17d819d1341e211a3d0bd0ecb7cf09884eaca767
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1764598
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/vm_area.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/vm_area.c b/drivers/gpu/nvgpu/common/mm/vm_area.c index 5d3b0526..5a28b7bc 100644 --- a/drivers/gpu/nvgpu/common/mm/vm_area.c +++ b/drivers/gpu/nvgpu/common/mm/vm_area.c | |||
@@ -218,8 +218,6 @@ int nvgpu_vm_area_free(struct vm_gk20a *vm, u64 addr) | |||
218 | nvgpu_ref_put(&buffer->ref, __nvgpu_vm_unmap_ref); | 218 | nvgpu_ref_put(&buffer->ref, __nvgpu_vm_unmap_ref); |
219 | } | 219 | } |
220 | 220 | ||
221 | nvgpu_mutex_release(&vm->update_gmmu_lock); | ||
222 | |||
223 | /* if this was a sparse mapping, free the va */ | 221 | /* if this was a sparse mapping, free the va */ |
224 | if (vm_area->sparse) | 222 | if (vm_area->sparse) |
225 | g->ops.mm.gmmu_unmap(vm, | 223 | g->ops.mm.gmmu_unmap(vm, |
@@ -231,6 +229,8 @@ int nvgpu_vm_area_free(struct vm_gk20a *vm, u64 addr) | |||
231 | true, | 229 | true, |
232 | NULL); | 230 | NULL); |
233 | 231 | ||
232 | nvgpu_mutex_release(&vm->update_gmmu_lock); | ||
233 | |||
234 | nvgpu_free(vm->vma[vm_area->pgsz_idx], vm_area->addr); | 234 | nvgpu_free(vm->vma[vm_area->pgsz_idx], vm_area->addr); |
235 | nvgpu_kfree(g, vm_area); | 235 | nvgpu_kfree(g, vm_area); |
236 | 236 | ||