]> Git Repo - qemu.git/commit - hw/acpi/piix4.c
acpi_piix4: fix segfault migrating from 1.2
authorMichael Roth <[email protected]>
Mon, 4 Feb 2013 16:07:51 +0000 (10:07 -0600)
committerAnthony Liguori <[email protected]>
Mon, 4 Feb 2013 20:39:07 +0000 (14:39 -0600)
commitded67782e6d06069873adce7f9074d273ae75760
tree9abf9d4193ce0d0cd6708781c8ac80a1a6c19327
parentc881e20eed4911ab6f8c674f2b1bf225a2cdde71
acpi_piix4: fix segfault migrating from 1.2

b0b873a07872f7ab7f66f259c73fb9dd42aa66a9 bumped the vmstate version and
introduced an old-style load function to handle migration from prior
(<= 1.2) versions.

The load function passes the top-level PIIX4PMState pointer to
vmstate_load_state() to handle nested structs for APMState and
pci_status, which leads to corruption of the top-level PIIX4PMState,
since pointers to the nested structs are expected.

A segfault can be fairly reliably triggered by migrating from 1.2 and
issuing a reset, which will trigger a number of QOM operations which
rely on the now corrupted ObjectClass/Object members.

Fix this by passing in the expected pointers for vmstate_load_state().

Cc: [email protected]
Signed-off-by: Michael Roth <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/acpi_piix4.c
This page took 0.026441 seconds and 4 git commands to generate.