Commit 64cc12f
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: 4d82724 ("drm/amdgpu: Add mapping info option for GEM_OP ioctl")
Fixes: f9db1fc ("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>1 parent b7c5334 commit 64cc12f
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
1069 | | - | |
| 1069 | + | |
| 1070 | + | |
1070 | 1071 | | |
1071 | 1072 | | |
1072 | 1073 | | |
| |||
1158 | 1159 | | |
1159 | 1160 | | |
1160 | 1161 | | |
1161 | | - | |
| 1162 | + | |
| 1163 | + | |
1162 | 1164 | | |
1163 | 1165 | | |
1164 | 1166 | | |
| |||
0 commit comments