Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197675
b: refs/heads/master
c: 6ce5a09
h: refs/heads/master
i:
  197673: 4d52c41
  197671: 5e7155d
v: v3
  • Loading branch information
Takuya Yoshikawa authored and Avi Kivity committed May 17, 2010
1 parent ed1040e commit 392aed0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 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: 31299944584fd62df8b0cfa30ad2c56f445b8cf2
refs/heads/master: 6ce5a090a9a0ea4266a2cad058c69e2f27201e11
2 changes: 2 additions & 0 deletions trunk/virt/kvm/coalesced_mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ int kvm_coalesced_mmio_init(struct kvm *kvm)
return ret;

out_free_dev:
kvm->coalesced_mmio_dev = NULL;
kfree(dev);
out_free_page:
kvm->coalesced_mmio_ring = NULL;
__free_page(page);
out_err:
return ret;
Expand Down
12 changes: 8 additions & 4 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,6 @@ static struct kvm *kvm_create_vm(void)
spin_lock(&kvm_lock);
list_add(&kvm->vm_list, &vm_list);
spin_unlock(&kvm_lock);
#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
kvm_coalesced_mmio_init(kvm);
#endif
out:
return kvm;

Expand Down Expand Up @@ -1753,12 +1750,19 @@ static struct file_operations kvm_vm_fops = {

static int kvm_dev_ioctl_create_vm(void)
{
int fd;
int fd, r;
struct kvm *kvm;

kvm = kvm_create_vm();
if (IS_ERR(kvm))
return PTR_ERR(kvm);
#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
r = kvm_coalesced_mmio_init(kvm);
if (r < 0) {
kvm_put_kvm(kvm);
return r;
}
#endif
fd = anon_inode_getfd("kvm-vm", &kvm_vm_fops, kvm, O_RDWR);
if (fd < 0)
kvm_put_kvm(kvm);
Expand Down

0 comments on commit 392aed0

Please sign in to comment.