Commit 92e022e6 authored by Christian König's avatar Christian König Committed by Sasha Levin

drm/radeon: fix lockup when BOs aren't part of the VM on release

[ Upstream commit 26d4d129 ]

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: default avatarChristian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent c46ed652
...@@ -1058,6 +1058,7 @@ void radeon_vm_bo_rmv(struct radeon_device *rdev, ...@@ -1058,6 +1058,7 @@ void radeon_vm_bo_rmv(struct radeon_device *rdev,
list_del(&bo_va->bo_list); list_del(&bo_va->bo_list);
mutex_lock(&vm->mutex); mutex_lock(&vm->mutex);
if (bo_va->it.start || bo_va->it.last)
interval_tree_remove(&bo_va->it, &vm->va); interval_tree_remove(&bo_va->it, &vm->va);
list_del(&bo_va->vm_status); list_del(&bo_va->vm_status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment