From patchwork Wed Jul 14 19:36:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 112054 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6EJaw9N002741 for ; Wed, 14 Jul 2010 19:36:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756081Ab0GNTgz (ORCPT ); Wed, 14 Jul 2010 15:36:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60016 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755228Ab0GNTgz (ORCPT ); Wed, 14 Jul 2010 15:36:55 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6EJaovS002292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Jul 2010 15:36:51 -0400 Received: from localhost6.localdomain6 (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6EJanpR010402; Wed, 14 Jul 2010 15:36:50 -0400 From: Alex Williamson Subject: [PATCH] kvm: Don't walk memory_size == 0 slots in kvm_client_migration_log To: kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: mtosatti@redhat.com, avi@redhat.com Date: Wed, 14 Jul 2010 13:36:49 -0600 Message-ID: <20100714193606.7124.80638.stgit@localhost6.localdomain6> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 14 Jul 2010 19:36:58 +0000 (UTC) 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; }