Files
linux/arch/mips/kvm
Michael S. Tsirkin ce16d9cf04 mips/kvm: fix ioctl error handling
commit 0178fd7dcc upstream.

Returning directly whatever copy_to_user(...) or copy_from_user(...)
returns may not do the right thing if there's a pagefault:
copy_to_user/copy_from_user return the number of bytes not copied in
this case, but ioctls need to return -EFAULT instead.

Fix up kvm on mips to do
	return copy_to_user(...)) ?  -EFAULT : 0;
and
	return copy_from_user(...)) ?  -EFAULT : 0;

everywhere.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-09 15:34:50 -08:00
..
2015-03-27 21:25:14 +00:00
2015-11-18 12:25:35 +01:00
2015-03-27 21:25:19 +00:00
2016-03-09 15:34:50 -08:00
2015-03-27 21:25:19 +00:00
2015-03-27 21:25:20 +00:00