On 06/22/10 - 03:38:19PM, Eric Blake wrote: > 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. Thanks, I pushed this now. -- Chris Lalancette -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list