diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-02-16 11:19:18 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-02-16 11:19:18 +0100 |
commit | ba9341dfef6b0201cd30e3904dcd0a47d3dc35e0 (patch) | |
tree | d83637979db83bb9d5a23e190148b90b60c976d2 /virt/kvm | |
parent | d39e82db73eb876c60d00f00219d767b3be30307 (diff) | |
parent | f167e1d073278fe231bbdd5d6c24fb9d091aa544 (diff) |
Merge branch 'fixes' into devel
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/assigned-dev.c | 6 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index fd9c097b760a..f73de631e3ee 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c @@ -508,8 +508,8 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm, struct kvm_assigned_dev_kernel *match; struct pci_dev *dev; - down_read(&kvm->slots_lock); mutex_lock(&kvm->lock); + down_read(&kvm->slots_lock); match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head, assigned_dev->assigned_dev_id); @@ -573,8 +573,8 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm, } out: - mutex_unlock(&kvm->lock); up_read(&kvm->slots_lock); + mutex_unlock(&kvm->lock); return r; out_list_del: list_del(&match->list); @@ -585,8 +585,8 @@ out_put: pci_dev_put(dev); out_free: kfree(match); - mutex_unlock(&kvm->lock); up_read(&kvm->slots_lock); + mutex_unlock(&kvm->lock); return r; } diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index b5af88167613..a944be392d6e 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -64,7 +64,7 @@ MODULE_LICENSE("GPL"); /* * Ordering of locks: * - * kvm->slots_lock --> kvm->lock --> kvm->irq_lock + * kvm->lock --> kvm->slots_lock --> kvm->irq_lock */ DEFINE_SPINLOCK(kvm_lock); @@ -406,8 +406,11 @@ 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); |