diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2016-02-28 16:31:39 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-09 15:34:50 -0800 |
| commit | 7931825da8fd57ceb8bae86d3dbe555a506a7edd (patch) | |
| tree | 6dda3fbb729623eaeb5f84f1d1c21e8b01e1465e /drivers/iommu/amd_iommu_init.c | |
| parent | bbb3c5076be5c932609524db605e7911ecb95b47 (diff) | |
vfio: fix ioctl error handling
commit 8160c4e455820d5008a1116d2dca35f0363bb062 upstream.
Calling return copy_to_user(...) in an ioctl will not
do the right thing if there's a pagefault:
copy_to_user returns the number of bytes not copied
in this case.
Fix up vfio to do
return copy_to_user(...)) ?
-EFAULT : 0;
everywhere.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
0 files changed, 0 insertions, 0 deletions
