Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343527
b: refs/heads/master
c: 1859541
h: refs/heads/master
i:
  343525: aa1bf91
  343523: 757e37b
  343519: bf79374
v: v3
  • Loading branch information
Guo Chao authored and Marcelo Tosatti committed Nov 14, 2012
1 parent 2788cb9 commit 96f540b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f026399fc90655ac444c62139aa4f8a02e1c795a
refs/heads/master: 18595411a7146330ec19adf0b9db8e6736c84a4e
19 changes: 6 additions & 13 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -2689,14 +2689,11 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
break;
}
case KVM_SET_LAPIC: {
r = -EINVAL;
if (!vcpu->arch.apic)
goto out;
u.lapic = memdup_user(argp, sizeof(*u.lapic));
if (IS_ERR(u.lapic)) {
r = PTR_ERR(u.lapic);
goto out;
}
if (IS_ERR(u.lapic))
return PTR_ERR(u.lapic);

r = kvm_vcpu_ioctl_set_lapic(vcpu, u.lapic);
if (r)
Expand Down Expand Up @@ -2877,10 +2874,8 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
}
case KVM_SET_XSAVE: {
u.xsave = memdup_user(argp, sizeof(*u.xsave));
if (IS_ERR(u.xsave)) {
r = PTR_ERR(u.xsave);
goto out;
}
if (IS_ERR(u.xsave))
return PTR_ERR(u.xsave);

r = kvm_vcpu_ioctl_x86_set_xsave(vcpu, u.xsave);
break;
Expand All @@ -2902,10 +2897,8 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
}
case KVM_SET_XCRS: {
u.xcrs = memdup_user(argp, sizeof(*u.xcrs));
if (IS_ERR(u.xcrs)) {
r = PTR_ERR(u.xcrs);
goto out;
}
if (IS_ERR(u.xcrs))
return PTR_ERR(u.xcrs);

r = kvm_vcpu_ioctl_x86_set_xcrs(vcpu, u.xcrs);
break;
Expand Down
2 changes: 2 additions & 0 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,7 @@ static long kvm_vcpu_ioctl(struct file *filp,
kvm_sregs = memdup_user(argp, sizeof(*kvm_sregs));
if (IS_ERR(kvm_sregs)) {
r = PTR_ERR(kvm_sregs);
kvm_sregs = NULL;
goto out;
}
r = kvm_arch_vcpu_ioctl_set_sregs(vcpu, kvm_sregs);
Expand Down Expand Up @@ -2054,6 +2055,7 @@ static long kvm_vcpu_ioctl(struct file *filp,
fpu = memdup_user(argp, sizeof(*fpu));
if (IS_ERR(fpu)) {
r = PTR_ERR(fpu);
fpu = NULL;
goto out;
}
r = kvm_arch_vcpu_ioctl_set_fpu(vcpu, fpu);
Expand Down

0 comments on commit 96f540b

Please sign in to comment.