Skip to content

Commit 9eb41c5

Browse files
author
Al Viro
committed
x86: kvm_hv_set_msr(): use __put_user() instead of 32bit __clear_user()
Signed-off-by: Al Viro <[email protected]>
1 parent 5ea75ae commit 9eb41c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/hyperv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
11291129
* only, there can be valuable data in the rest which needs
11301130
* to be preserved e.g. on migration.
11311131
*/
1132-
if (__clear_user((void __user *)addr, sizeof(u32)))
1132+
if (__put_user(0, (u32 __user *)addr))
11331133
return 1;
11341134
hv_vcpu->hv_vapic = data;
11351135
kvm_vcpu_mark_page_dirty(vcpu, gfn);

0 commit comments

Comments
 (0)