Skip to contentSkip to conversation

KVM: trivial fix comment regarding __kvm_set_memory_region

PATCH In review Dominik Dingel 2 participants 2 messages Oct 27, 2014 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: trivial fix comment regarding __kvm_set_memory_region

commit 72dc67a69690 ("KVM: remove the usage of the mmap_sem for the protection of the memory slots.") changed the lock which will be taken. This should be reflected in the function commentary.

---
 virt/kvm/kvm_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
virt/kvm/kvm_main.c +1 -1
index d82ec25..8b13607 100644
@@ -738,7 +738,7 @@ static struct kvm_memslots *install_new_memslots(struct kvm *kvm,
  *
  * Discontiguous memory is allowed, mostly for framebuffers.
  *
- * Must be called holding mmap_sem for write.
+ * Must be called holding kvm->slots_lock for write.
  */
 int __kvm_set_memory_region(struct kvm *kvm,
 			    struct kvm_userspace_memory_region *mem)
Signature · 1 line
1.8.5.5
maintainer
#1 lore raw
Quoted 3 lines · Dominik Dingel

commit 72dc67a69690 ("KVM: remove the usage of the mmap_sem for the protection of the memory slots.") changed the lock which will be taken. This should be reflected in the function commentary.

Whoa, February 2008. :)

Thanks, applying this patch.

Paolo

Quoted 19 lines
---
 virt/kvm/kvm_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
virt/kvm/kvm_main.c +1 -1
index d82ec25..8b13607 100644
@@ -738,7 +738,7 @@ static struct kvm_memslots *install_new_memslots(struct kvm *kvm,
  *
  * Discontiguous memory is allowed, mostly for framebuffers.
  *
- * Must be called holding mmap_sem for write.
+ * Must be called holding kvm->slots_lock for write.
  */
 int __kvm_set_memory_region(struct kvm *kvm,
 			    struct kvm_userspace_memory_region *mem)