提交 fbbf794c 编写于 作者: C Christian König 提交者: Alex Deucher

drm/amdgpu: set bulk_moveable to false when a per VM is released

Otherwise we might run into a use after free during bulk move.
Signed-off-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NHuang Rui <ray.huang@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 03f67ed1
......@@ -2512,8 +2512,12 @@ void amdgpu_vm_bo_rmv(struct amdgpu_device *adev,
struct amdgpu_bo_va *bo_va)
{
struct amdgpu_bo_va_mapping *mapping, *next;
struct amdgpu_bo *bo = bo_va->base.bo;
struct amdgpu_vm *vm = bo_va->base.vm;
if (bo && bo->tbo.resv == vm->root.base.bo->tbo.resv)
vm->bulk_moveable = false;
list_del(&bo_va->base.bo_list);
spin_lock(&vm->invalidated_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册