On 06/15/2010 06:03 AM, Chris Lalancette wrote: > Make sure to *not* call qemuDomainPCIAddressReleaseAddr if > QEMUD_CMD_FLAG_DEVICE is *not* set (for older qemu). This > prevents a crash when trying to do device detachment from > a qemu guest. > > Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx> > --- > src/qemu/qemu_driver.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index 66e9f52..93072a4 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -8522,9 +8522,9 @@ static int qemudDomainDetachPciControllerDevice(struct qemud_driver *driver, > vm->def->ncontrollers = 0; > } > > - if (qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0) { > + if ((qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) && > + qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0) > VIR_WARN0("Unable to release PCI address on controller"); > - } ACK. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list