Michael S. Tsirkin d1c623c9c2 arm/arm64: KVM: Fix ioctl error handling
commit 4cad67fca3fc952d6f2ed9e799621f07666a560f 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 kvm to do
	return copy_to_user(...)) ?  -EFAULT : 0;

everywhere.

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-09 15:34:51 -08:00
..
2015-11-10 10:05:17 -08:00
2015-11-12 15:26:39 -08:00
2015-11-22 11:35:26 +01:00
2015-11-10 16:24:25 -08:00
2016-03-09 15:34:50 -08:00
2015-11-26 22:25:58 +08:00
2015-12-12 10:15:34 -08:00
2016-03-03 15:07:12 -08:00
2015-11-11 09:16:10 -08:00