qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] savevm: fix corruption in vmstate_subsectio


From: Yoshiaki Tamura
Subject: Re: [Qemu-devel] Re: [PATCH] savevm: fix corruption in vmstate_subsection_load().
Date: Thu, 20 Jan 2011 17:57:32 +0900

2011/1/20 Paolo Bonzini <address@hidden>:
> On 12/14/2010 10:07 AM, Yoshiaki Tamura wrote:
>>
>> Although it's rare to happen in live migration, when the head of a
>> byte stream contains 0x05
>
> IIUC, this happens if you have VMS_STRUCT and the field after the VMS_STRUCT
> starts with 0x5.
>
> I think you should also add this in vmstate_subsection_load:
>
>    sub_vmsd = vmstate_get_subsection(sub, idstr);
>    if (sub_vmsd == NULL) {
>        return -ENOENT;
>    }
> +   assert (!sub_vmsd->subsections);
>    ret = vmstate_load_state(f, sub_vmsd, opaque, version_id);
>
> and this in vmstate_load_state:
>
>    if (field->flags & VMS_STRUCT) {
> +       assert (!vmsd->subsections);
>        ret = vmstate_load_state(f, field->vmsd, addr,
>                                 field->vmsd->version_id);
>    }

Hi Paolo,

You mean, having subsection nested and under VMS_STRUCT are
violations?

Yoshi

>
> Paolo
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]