drm/amdgpu: fix off by one in amdgpu_vm_handle_fault
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix off by one in amdgpu_vm_handle_fault
The value is inclusive, not exclusive.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -3351,7 +3351,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid, } r =amdgpu_vm_bo_update_mapping (adev, adev, vm, true, false,NULL , addr, - addr +1 , flags, value,NULL ,NULL , + addr, flags, value,NULL ,NULL ,NULL );if (r) goto error_unlock;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 2020-11-02 um 11:23 a.m. schrieb Christian König:
Quoted 3 lines
The value is inclusive, not exclusive.
Signed-off-by Christian König <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid, · line 3357
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-1@@ -3351,7 +3351,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid, } r =amdgpu_vm_bo_update_mapping (adev, adev, vm, true, false,NULL , addr, - addr +1 , flags, value,NULL ,NULL , + addr, flags, value,NULL ,NULL ,NULL );if (r) goto error_unlock;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 13 lines · Christian König
The value is inclusive, not exclusive.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid, · line 3352
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0@@ -3351,7 +3351,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid, }
Might want to add a comment here about the value being inclusive.
Alex
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-2r =amdgpu_vm_bo_update_mapping (adev, adev, vm, true, false,NULL , addr, - addr +1 , flags, value,NULL ,NULL , + addr, flags, value,NULL ,NULL ,NULL );if (r) goto error_unlock; --2.25.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian König
Sent: Monday, November 2, 2020 9:54 PM
To: [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: [PATCH] drm/amdgpu: fix off by one in amdgpu_vm_handle_fault
The value is inclusive, not exclusive.
Looks good to me: Reviewed-by: Madhav Chauhan <[email protected]>
Regards,
Madhav
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -3351,7 +3351,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid, } r =amdgpu_vm_bo_update_mapping (adev, adev, vm, true, false,NULL , addr, - addr +1 , flags, value,NULL ,NULL , + addr, flags, value,NULL ,NULL ,NULL );if (r) goto error_unlock;
Signature · 10 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cmadhav.chauhan%40amd.com%7C38fd51f6e3a74e7016e908d87f4bb334%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637399310420807189%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wanWs7XSQCWerT1e8wYxZHqymam2LpqyytPbeUs%2FzDQ%3D&reserved=0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx