aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-04-27 11:04:34 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-04-27 11:27:59 -0400
commit26d4d129b6042197b4cbc8341c0618f99231af2f (patch)
treeb9242dfb94f34298e3a68b7ec7c07322ebf575dd /drivers/gpu
parentcd17e02ff4db58ec32d35cf331c705d295779930 (diff)
drm/radeon: fix lockup when BOs aren't part of the VM on release
If we unmap BOs before releasing them them the intervall tree locks up because we try to remove an entry not inside the tree. Based on a patch from Michel Dänzer. Signed-off-by: Christian König <christian.koenig@amd.com> CC: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_vm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index 2a5a4a9e772d..16d8e95abd94 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -1107,7 +1107,8 @@ void radeon_vm_bo_rmv(struct radeon_device *rdev,
1107 list_del(&bo_va->bo_list); 1107 list_del(&bo_va->bo_list);
1108 1108
1109 mutex_lock(&vm->mutex); 1109 mutex_lock(&vm->mutex);
1110 interval_tree_remove(&bo_va->it, &vm->va); 1110 if (bo_va->it.start || bo_va->it.last)
1111 interval_tree_remove(&bo_va->it, &vm->va);
1111 spin_lock(&vm->status_lock); 1112 spin_lock(&vm->status_lock);
1112 list_del(&bo_va->vm_status); 1113 list_del(&bo_va->vm_status);
1113 1114