qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] xhci: Fix memory leak in xhci_kick_epctx when poweroff Guest


From: Gerd Hoffmann
Subject: Re: [PATCH] xhci: Fix memory leak in xhci_kick_epctx when poweroff GuestOS
Date: Mon, 13 Jan 2020 08:48:05 +0100

> > diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
> > index 80988bb305..0d3d96d05a 100644
> > --- a/hw/usb/hcd-xhci.c
> > +++ b/hw/usb/hcd-xhci.c
> > @@ -2000,6 +2000,7 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, 
> > unsigned int streamid)
> >           if (xfer != NULL && xfer->running_retry) {
> >               DPRINTF("xhci: xfer nacked, stopping schedule\n");
> >               epctx->retry = xfer;
> > +            xhci_xfer_unmap(xfer);
> 
> Shouldn't we use xhci_ep_free_xfer() instead?

No, xhci will try to run the transfer again later.

xhci will re-create the sgl then, so freeing the
sgl here is correct.  Patch added to usb queue.

thanks,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]