virtio-blk: fix unplug + virsh reboot
commit69b302b2044a9a0f6d157d25b39a91ff7124c61f
authorChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 22 Feb 2013 13:37:10 +0000 (22 14:37 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 4 Mar 2013 08:54:16 +0000 (4 09:54 +0100)
treebe66ecfb923c2641b4b2819d0cc881da56d490b0
parent02d583c7232d65920634f7553700eb348f84e472
virtio-blk: fix unplug + virsh reboot

virtio-blk registers a vmstate change handler. Unfortunately this
handler is not unregistered on unplug, leading to some random
crashes if the system is restarted, e.g. via virsh reboot.
Lets unregister the vmstate change handler if the device is removed.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/virtio-blk.c