android_kernel_samsung_univ.../drivers/vfio
Michael S. Tsirkin 7931825da8 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>
2016-03-09 15:34:50 -08:00
..
pci vfio: fix ioctl error handling 2016-03-09 15:34:50 -08:00
platform vfio: fix ioctl error handling 2016-03-09 15:34:50 -08:00
Kconfig Revert: "vfio: Include No-IOMMU mode" 2015-12-04 08:38:42 -07:00
Makefile vfio: Split virqfd into a separate module for vfio bus drivers 2015-03-17 08:33:38 -06:00
vfio_iommu_spapr_tce.c vfio: powerpc/spapr: Support Dynamic DMA windows 2015-06-11 15:16:55 +10:00
vfio_iommu_type1.c vfio: fix ioctl error handling 2016-03-09 15:34:50 -08:00
vfio_spapr_eeh.c drivers/vfio: Support EEH error injection 2015-05-12 20:33:35 +10:00
vfio.c Revert: "vfio: Include No-IOMMU mode" 2015-12-04 08:38:42 -07:00
virqfd.c vfio: Split virqfd into a separate module for vfio bus drivers 2015-03-17 08:33:38 -06:00