]> Gentwo Git Trees - linux/.git/commit
drm/amdgpu: Fix error codes if copy_to_user() fails
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 4 Sep 2025 18:58:49 +0000 (21:58 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Sep 2025 21:38:42 +0000 (17:38 -0400)
commit64cc12f9798f146f2c616db4885d653741d3b3c1
tree3ab8c98d5d49ea4b3587319d255ce6c93747c354
parentb7c5334af69d359fcd7a39ed409a08138900ec18
drm/amdgpu: Fix error codes if copy_to_user() fails

The copy_to_user() function returns the number of bytes that it wasn't
able to copy, but we should return -EFAULT to the user.

Fixes: 4d82724f7f2b ("drm/amdgpu: Add mapping info option for GEM_OP ioctl")
Fixes: f9db1fc52ceb ("drm/amdgpu: Add ioctl to get all gem handles for a process")
Reviewed-By: David Francis <David.Francis@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c