Blame SOURCES/kvm-The-calculation-of-bytes_xfer-in-qemu_put_buffer-is-.patch

9ae3a8
From a1b552f36a3257593125f054a83c467915c65dc4 Mon Sep 17 00:00:00 2001
9ae3a8
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
9ae3a8
Date: Tue, 14 Jan 2014 15:27:11 -0500
9ae3a8
Subject: [PATCH 02/14] The calculation of bytes_xfer in qemu_put_buffer() is
9ae3a8
 wrong
9ae3a8
9ae3a8
Message-id: <1389713232-30999-2-git-send-email-dgilbert@redhat.com>
9ae3a8
Patchwork-id: 56697
9ae3a8
O-Subject: [RHEL-7.0 qemu-kvm PATCH 1/2] The calculation of bytes_xfer in qemu_put_buffer() is wrong
9ae3a8
Bugzilla: 1003467
9ae3a8
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
9ae3a8
From: "Wangting (Kathy)" <kathy.wangting@huawei.com>
9ae3a8
9ae3a8
In qemu_put_buffer(), bytes_xfer += size is wrong, it will be more
9ae3a8
than expected, and should be bytes_xfer += l.
9ae3a8
9ae3a8
Signed-off-by: zhangmin <zhangmin6@huawei.com>
9ae3a8
Signed-off-by: Juan Quintela <quintela@redhat.com>
9ae3a8
(cherry picked from commit 8e86729a0e83b557c22808a2337252c969ca3986)
9ae3a8
---
9ae3a8
 savevm.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 savevm.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
diff --git a/savevm.c b/savevm.c
9ae3a8
index a0d4e09..bd37959 100644
9ae3a8
--- a/savevm.c
9ae3a8
+++ b/savevm.c
9ae3a8
@@ -787,7 +787,7 @@ void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size)
9ae3a8
         if (l > size)
9ae3a8
             l = size;
9ae3a8
         memcpy(f->buf + f->buf_index, buf, l);
9ae3a8
-        f->bytes_xfer += size;
9ae3a8
+        f->bytes_xfer += l;
9ae3a8
         if (f->ops->writev_buffer) {
9ae3a8
             add_to_iovec(f, f->buf + f->buf_index, l);
9ae3a8
         }
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8