[PATCH] drm/amdgpu: fix off by one in amdgpu_vm_handle_fault

Chauhan, Madhav Madhav.Chauhan at amd.com
Mon Nov 2 19:07:07 UTC 2020


[AMD Public Use]

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Christian König
Sent: Monday, November 2, 2020 9:54 PM
To: amd-gfx at lists.freedesktop.org
Cc: Kuehling, Felix <Felix.Kuehling at amd.com>
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 <madhav.chauhan at amd.com>

Regards,
Madhav

Signed-off-by: Christian König <christian.koenig at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index dc0bc550e42b..fdbe7d4e8b8b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -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;
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
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


More information about the amd-gfx mailing list