projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03f67ed
)
drm/amdgpu: set bulk_moveable to false when a per VM is released
author
Christian König
<
[email protected]
>
Wed, 5 Sep 2018 15:04:44 +0000
(17:04 +0200)
committer
Alex Deucher
<
[email protected]
>
Tue, 11 Sep 2018 03:45:32 +0000
(22:45 -0500)
Otherwise we might run into a use after free during bulk move.
Signed-off-by: Christian König <
[email protected]
>
Reviewed-by: Huang Rui <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 9a5b1bbfb77cfe411b4ad30463b461f04dad5ba0..f5a9600797056e461ac6a985e4aed55e825938c6 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@
-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);