diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-12-02 09:44:43 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-12-02 04:36:40 -0500 |
commit | 2c602741b51daa12f8457f222ce9ce9c4825d067 (patch) | |
tree | e2fecdf55e0f458b58b665593b43644cb7d30bac /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 98701a2a861fa87a5055cf2809758e8725e8b146 (diff) | |
download | lwn-2c602741b51daa12f8457f222ce9ce9c4825d067.tar.gz lwn-2c602741b51daa12f8457f222ce9ce9c4825d067.zip |
vhost_vdpa: return -EFAULT if copy_to_user() fails
The copy_to_user() function returns the number of bytes remaining to be
copied but this should return -EFAULT to the user.
Fixes: 1b48dc03e575 ("vhost: vdpa: report iova range")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X8c32z5EtDsMyyIL@mwanda
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions