[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/2] Fix crash when detaching devices from qemu domains.



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 redhat com>
> > ---
> >  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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]