diff options
author | Christian König <christian.koenig@amd.com> | 2018-10-24 16:25:23 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-10-26 20:27:06 +0200 |
commit | 4faaaa762328cfb8579b9c908999ca189e2ea474 (patch) | |
tree | 347a2d81b8b35e50ec1ad94f6e0cd856ababbfef /drivers/gpu/drm/amd | |
parent | drm/amdgpu: fix amdgpu_vm_fini (diff) | |
download | linux-4faaaa762328cfb8579b9c908999ca189e2ea474.tar.xz linux-4faaaa762328cfb8579b9c908999ca189e2ea474.zip |
drm/amdgpu: fix VM leaf walking
Make sure we don't try to go down further after the leave walk already
ended. This fixes a crash with a new VM test.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Rex Zhu Rex.Zhu@amd.com
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index db0cbf8d219d..352b30409060 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -542,7 +542,8 @@ static void amdgpu_vm_pt_next_leaf(struct amdgpu_device *adev, struct amdgpu_vm_pt_cursor *cursor) { amdgpu_vm_pt_next(adev, cursor); - while (amdgpu_vm_pt_descendant(adev, cursor)); + if (cursor->pfn != ~0ll) + while (amdgpu_vm_pt_descendant(adev, cursor)); } /** |