drm/radeon: reset BOs address after clearing it.
authorChristian König <christian.koenig@amd.com>
Mon, 27 Apr 2015 15:04:35 +0000 (17:04 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Apr 2015 15:29:14 +0000 (11:29 -0400)
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@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_vm.c

index 16d8e95abd9413cb2529e25d6dc2d0d1b9726337..cabcb0aafe0384bc9f3d74f43531d3397241dce0 100644 (file)
@@ -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);