diff options
author | Michael S. Tsirkin <[email protected]> | 2016-02-28 17:35:59 +0200 |
---|---|---|
committer | Ralf Baechle <[email protected]> | 2016-02-29 15:52:20 +0100 |
commit | 887349f69f37e71e2a8bfbd743831625a0b2ff51 (patch) | |
tree | ac0d63782c01d60270a07279514394759062640e /lib/pm-notifier-error-inject.c | |
parent | 56fa81fc9a5445938f3aa2e63d15ab63dc938ad6 (diff) |
MIPS: kvm: Fix ioctl error handling.
Calling return copy_to_user(...) or return copy_from_user in an ioctl
will 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.
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 <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: James Hogan <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/12709/
Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions