diff mbox

kvm: Don't walk memory_size == 0 slots in kvm_client_migration_log

Message ID 20100714193606.7124.80638.stgit@localhost6.localdomain6 (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Williamson July 14, 2010, 7:36 p.m. UTC
None
diff mbox

Patch

diff --git a/kvm-all.c b/kvm-all.c
index fec6d05..2922292 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -282,6 +282,9 @@  static int kvm_set_migration_log(int enable)
     for (i = 0; i < ARRAY_SIZE(s->slots); i++) {
         mem = &s->slots[i];
 
+        if (!mem->memory_size) {
+            continue;
+        }
         if (!!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES) == enable) {
             continue;
         }