[PATCH 2/4] drm/radeon: reset BOs address after clearing it.

Christian König deathsimple at vodafone.de
Mon Apr 27 08:04:35 PDT 2015


From: Christian König <christian.koenig at amd.com>

Otherwise it is possible that we will have page table corruption
if we change a BOs address multiple times.

Signed-off-by: Christian König <christian.koenig at amd.com>
CC: stable at vger.kernel.org
---
 drivers/gpu/drm/radeon/radeon_vm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index 16d8e95..cabcb0a 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -490,6 +490,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
 			spin_lock(&vm->status_lock);
 			list_add(&tmp->vm_status, &vm->freed);
 			spin_unlock(&vm->status_lock);
+
+			bo_va->addr = 0;
 		}
 
 		interval_tree_remove(&bo_va->it, &vm->va);
-- 
1.9.1



More information about the dri-devel mailing list