Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115327
b: refs/heads/master
c: 7d8fece
h: refs/heads/master
i:
  115325: 7cfce77
  115323: dca3897
  115319: 81ba406
  115311: 1d88f63
  115295: f8f4a1f
  115263: 34a9d92
  115199: 2949486
v: v3
  • Loading branch information
Glauber Costa authored and Avi Kivity committed Oct 15, 2008
1 parent 0bc98e5 commit 110aaa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: af2152f5457448bd90cb019c108e0a85e716fdbe
refs/heads/master: 7d8fece678c1abc2ca3e1ceda2277c3538a9161c
5 changes: 2 additions & 3 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,12 +1089,11 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n)

r = kvm_arch_vcpu_setup(vcpu);
if (r)
goto vcpu_destroy;
return r;

mutex_lock(&kvm->lock);
if (kvm->vcpus[n]) {
r = -EEXIST;
mutex_unlock(&kvm->lock);
goto vcpu_destroy;
}
kvm->vcpus[n] = vcpu;
Expand All @@ -1110,8 +1109,8 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n)
unlink:
mutex_lock(&kvm->lock);
kvm->vcpus[n] = NULL;
mutex_unlock(&kvm->lock);
vcpu_destroy:
mutex_unlock(&kvm->lock);
kvm_arch_vcpu_destroy(vcpu);
return r;
}
Expand Down

0 comments on commit 110aaa7

Please sign in to comment.