Patch is Tested-by:  Rex Zhu [email protected]<mailto:[email protected]>

Regards
Rex

From: amd-gfx <[email protected]> On Behalf Of Deucher, 
Alexander
Sent: Thursday, October 25, 2018 11:08 PM
To: Christian König <[email protected]>; 
[email protected]
Subject: Re: [PATCH] drm/amdgpu: fix VM leaf walking


Acked-by: Alex Deucher 
<[email protected]<mailto:[email protected]>>

________________________________
From: amd-gfx 
<[email protected]<mailto:[email protected]>>
 on behalf of Christian König 
<[email protected]<mailto:[email protected]>>
Sent: Thursday, October 25, 2018 10:38 AM
To: [email protected]<mailto:[email protected]>
Subject: [PATCH] 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 
<[email protected]<mailto:[email protected]>>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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));
 }

 /**
--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to