Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/nouveau/vm: make each vma take a reference on its parent vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

+4 -1
+4 -1
drivers/gpu/drm/nouveau/core/subdev/vm/base.c
··· 320 320 } 321 321 mutex_unlock(&nv_subdev(vmm)->mutex); 322 322 323 - vma->vm = vm; 323 + vma->vm = NULL; 324 + nouveau_vm_ref(vm, &vma->vm, NULL); 324 325 vma->offset = (u64)vma->node->offset << 12; 325 326 vma->access = access; 326 327 return 0; ··· 343 342 nouveau_vm_unmap_pgt(vm, vma->node->type != vmm->spg_shift, fpde, lpde); 344 343 nouveau_mm_free(&vm->mm, &vma->node); 345 344 mutex_unlock(&nv_subdev(vmm)->mutex); 345 + 346 + nouveau_vm_ref(NULL, &vma->vm, NULL); 346 347 } 347 348 348 349 int