diff options
author | Amos Kong <kongjianjun@gmail.com> | 2012-05-20 17:57:45 +0800 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-05-29 20:19:24 -0500 |
commit | a6de8ed80e1cf47d0f372e0856e6eeb6de9bbf0e (patch) | |
tree | 7cc00113c7e10ca1081dc5d14d79c004fa0451ec /hw/pci.c | |
parent | 9c3a596a03cc10c2d9097f057b9ccb9d557a4d5f (diff) |
pci: call object_unparent() before free_qdev()
Start VM with 8 multiple-function block devs, hot-removing
those block devs by 'device_del ...' would cause qemu abort.
| (qemu) device_del virti0-0-0
| (qemu) **
|ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0)
It's a regression introduced by commit 57c9fafe
The whole PCI slot should be removed once. Currently only one func
is cleaned in pci_unplug_device(), if you try to remove a single
func by monitor cmd.
free_qdev() are called for all functions in slot,
but unparent_delete() is only called for one
function.
Signed-off-by: XXXX
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r-- | hw/pci.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -1527,7 +1527,6 @@ static int pci_unplug_device(DeviceState *qdev) qerror_report(QERR_DEVICE_NO_HOTPLUG, object_get_typename(OBJECT(dev))); return -1; } - object_unparent(OBJECT(dev)); return dev->bus->hotplug(dev->bus->hotplug_qdev, dev, PCI_HOTPLUG_DISABLED); } |