aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kvm')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 0757c7027986..b2e4d16dd39e 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1382,7 +1382,7 @@ static void kvm_release_vm_pages(struct kvm *kvm)
1382 int i, j; 1382 int i, j;
1383 unsigned long base_gfn; 1383 unsigned long base_gfn;
1384 1384
1385 slots = kvm->memslots; 1385 slots = rcu_dereference(kvm->memslots);
1386 for (i = 0; i < slots->nmemslots; i++) { 1386 for (i = 0; i < slots->nmemslots; i++) {
1387 memslot = &slots->memslots[i]; 1387 memslot = &slots->memslots[i];
1388 base_gfn = memslot->base_gfn; 1388 base_gfn = memslot->base_gfn;
@@ -1837,6 +1837,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
1837 struct kvm_memory_slot *memslot; 1837 struct kvm_memory_slot *memslot;
1838 int is_dirty = 0; 1838 int is_dirty = 0;
1839 1839
1840 down_write(&kvm->slots_lock);
1840 spin_lock(&kvm->arch.dirty_log_lock); 1841 spin_lock(&kvm->arch.dirty_log_lock);
1841 1842
1842 r = kvm_ia64_sync_dirty_log(kvm, log); 1843 r = kvm_ia64_sync_dirty_log(kvm, log);
@@ -1856,6 +1857,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
1856 } 1857 }
1857 r = 0; 1858 r = 0;
1858out: 1859out:
1860 up_write(&kvm->slots_lock);
1859 spin_unlock(&kvm->arch.dirty_log_lock); 1861 spin_unlock(&kvm->arch.dirty_log_lock);
1860 return r; 1862 return r;
1861} 1863}