Received: from eggs.gnu.org ([2001:4830:134:3::10]:44864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQKEb-0001u5-7x for qemu-devel@nongnu.org; Wed, 19 Mar 2014 13:25:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQKET-0004yr-Jh for qemu-devel@nongnu.org; Wed, 19 Mar 2014 13:24:57 -0400 Message-id: <5329D2CA.6020909@samsung.com> Date: Wed, 19 Mar 2014 10:24:26 -0700 From: Mario Smarduch MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit Subject: [Qemu-devel] [PATCH] fix return check for KVM_GET_DIRTY_LOG ioctl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: qemu-trivial@nongnu.org Fix return condition check from kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) to handle internal failures or no support for memory slot dirty bitmap. Otherwise the ioctl succeeds and continues with migration. Addresses BUG# 1294227 Signed-off-by: Mario Smarduch --- kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvm-all.c b/kvm-all.c index 82a9119..cd4111d 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -441,7 +441,7 @@ static int kvm_physical_sync_dirty_bitmap(MemoryRegionSection *section) d.slot = mem->slot; - if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) == -1) { + if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) < 0) { DPRINTF("ioctl failed %d\n", errno); ret = -1; break; -- 1.7.9.5