Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185952
b: refs/heads/master
c: 283d0c6
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity authored and Marcelo Tosatti committed Mar 1, 2010
1 parent a62eed2 commit 68273eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 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: 953899b659adce62cbe83d6a7527550ab8797c48
refs/heads/master: 283d0c65e4c277cf81d71418341c74eee199d149
18 changes: 7 additions & 11 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,17 +374,16 @@ static struct kvm *kvm_create_vm(void)
#endif

#if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER)
{
kvm->mmu_notifier.ops = &kvm_mmu_notifier_ops;
r = mmu_notifier_register(&kvm->mmu_notifier, current->mm);
if (r) {
kvm->mmu_notifier.ops = &kvm_mmu_notifier_ops;
r = mmu_notifier_register(&kvm->mmu_notifier, current->mm);
#endif

if (r) {
#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
put_page(page);
put_page(page);
#endif
goto out_err;
}
goto out_err;
}
#endif

kvm->mm = current->mm;
atomic_inc(&kvm->mm->mm_count);
Expand All @@ -406,11 +405,8 @@ static struct kvm *kvm_create_vm(void)
out:
return kvm;

#if defined(KVM_COALESCED_MMIO_PAGE_OFFSET) || \
(defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER))
out_err:
hardware_disable_all();
#endif
out_err_nodisable:
kfree(kvm);
return ERR_PTR(r);
Expand Down

0 comments on commit 68273eb

Please sign in to comment.