qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 5/5] Revert "savevm: fix corruption in vmstate_subsection_load()."
Date: Thu,  6 Oct 2011 18:21:40 +0200	[thread overview]
Message-ID: <d2cd9d1b2b77d23a3148ba650f68d7457f91ad1e.1317911543.git.quintela@redhat.com> (raw)
In-Reply-To: <cover.1317911543.git.quintela@redhat.com>
In-Reply-To: <cover.1317911543.git.quintela@redhat.com>

This reverts commit eb60260de0b050a5e8ab725e84d377d0b44c43ae.

Conflicts:

	savevm.c

We changed qemu_peek_byte() prototype, just fixed the rejects.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
---
 savevm.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/savevm.c b/savevm.c
index 28c0a43..1c62269 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1704,12 +1704,6 @@ static const VMStateDescription *vmstate_get_subsection(const VMStateSubsection
 static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd,
                                    void *opaque)
 {
-    const VMStateSubsection *sub = vmsd->subsections;
-
-    if (!sub || !sub->needed) {
-        return 0;
-    }
-
     while (qemu_peek_byte(f, 0) == QEMU_VM_SUBSECTION) {
         char idstr[256];
         int ret;
@@ -1731,7 +1725,7 @@ static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd,
             /* it don't have a valid subsection name */
             return 0;
         }
-        sub_vmsd = vmstate_get_subsection(sub, idstr);
+        sub_vmsd = vmstate_get_subsection(vmsd->subsections, idstr);
         if (sub_vmsd == NULL) {
             return -ENOENT;
         }
@@ -1740,7 +1734,6 @@ static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd,
         qemu_file_skip(f, len); /* idstr */
         version_id = qemu_get_be32(f);

-        assert(!sub_vmsd->subsections);
         ret = vmstate_load_state(f, sub_vmsd, opaque, version_id);
         if (ret) {
             return ret;
@@ -1764,7 +1757,6 @@ static void vmstate_subsection_save(QEMUFile *f, const VMStateDescription *vmsd,
             qemu_put_byte(f, len);
             qemu_put_buffer(f, (uint8_t *)vmsd->name, len);
             qemu_put_be32(f, vmsd->version_id);
-            assert(!vmsd->subsections);
             vmstate_save_state(f, vmsd, opaque);
         }
         sub++;
-- 
1.7.6.4

  parent reply	other threads:[~2011-10-06 16:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06 16:21 [Qemu-devel] [PATCH 0/5] migration: Improve subsections detection Juan Quintela
2011-10-06 16:21 ` [Qemu-devel] [PATCH 1/5] savevm: teach qemu_fill_buffer to do partial refills Juan Quintela
2011-10-06 16:21 ` [Qemu-devel] [PATCH 2/5] savevm: some coding style cleanups Juan Quintela
2011-10-06 16:21 ` [Qemu-devel] [PATCH 3/5] savevm: define qemu_get_byte() using qemu_peek_byte() Juan Quintela
2011-10-06 16:26   ` Paolo Bonzini
2011-10-06 22:40     ` Juan Quintela
2011-10-06 16:21 ` [Qemu-devel] [PATCH 4/5] savevm: improve subsections detection on load Juan Quintela
2011-10-06 16:26   ` Paolo Bonzini
2011-10-06 22:42     ` Juan Quintela
2011-10-07  6:37       ` Paolo Bonzini
2011-10-06 16:21 ` Juan Quintela [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-07 10:53 [Qemu-devel] [PATCH v3 0/5] migration: Improve subsections detection Juan Quintela
2011-10-07 10:53 ` [Qemu-devel] [PATCH 5/5] Revert "savevm: fix corruption in vmstate_subsection_load()." Juan Quintela
2011-10-09 19:49 [Qemu-devel] [PATCH v4 0/5] Improve subsections detection Juan Quintela
2011-10-09 19:50 ` [Qemu-devel] [PATCH 5/5] Revert "savevm: fix corruption in vmstate_subsection_load()." Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d2cd9d1b2b77d23a3148ba650f68d7457f91ad1e.1317911543.git.quintela@redhat.com \
    --to=quintela@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).