summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-02-18 17:32:46 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2020-06-03 16:59:35 -0400
commit9eb41c521465f62332dfddcd399412fdff9c062b (patch)
treea26f9c8063048d7dfad84269954a82a710ca3b5a /arch/x86/kvm
parent5ea75ae6ae60d13dfa35fd5d2e2a81824cba6662 (diff)
downloadlinux-9eb41c521465f62332dfddcd399412fdff9c062b.tar.gz
linux-9eb41c521465f62332dfddcd399412fdff9c062b.tar.bz2
linux-9eb41c521465f62332dfddcd399412fdff9c062b.zip
x86: kvm_hv_set_msr(): use __put_user() instead of 32bit __clear_user()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/hyperv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index bcefa9d4e57e..b85b211d4676 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -1129,7 +1129,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
* only, there can be valuable data in the rest which needs
* to be preserved e.g. on migration.
*/
- if (__clear_user((void __user *)addr, sizeof(u32)))
+ if (__put_user(0, (u32 __user *)addr))
return 1;
hv_vcpu->hv_vapic = data;
kvm_vcpu_mark_page_dirty(vcpu, gfn);