]> git.proxmox.com Git - qemu.git/commit
savevm: fix corruption in vmstate_subsection_load().
authorYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Thu, 3 Feb 2011 04:34:08 +0000 (13:34 +0900)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 4 Feb 2011 12:33:26 +0000 (06:33 -0600)
commiteb60260de0b050a5e8ab725e84d377d0b44c43ae
treec6af18ce62dab7bfb20ecf98ff8b1d894968b456
parentbfddb47a343b4718e5768aa80bce8adead0f7fca
savevm: fix corruption in vmstate_subsection_load().

Although it's rare to happen in live migration, when the head of a
byte stream contains 0x05 which is the marker of subsection, the
loader gets corrupted because vmstate_subsection_load() continues even
the device doesn't require it.  This patch adds a checker whether
subsection is needed, and skips following routines if not needed.

Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
savevm.c