>-----Original Message-----
>From: Gerd Hoffmann [mailto:kra...@redhat.com]
>Sent: Monday, January 13, 2020 3:48 PM
>To: Philippe Mathieu-Daudé <phi...@redhat.com>
>Cc: Chenqun (kuhn) <kuhn.chen...@huawei.com>; qemu-
>de...@nongnu.org; qemu-triv...@nongnu.org; Pannengyuan
><pannengy...@huawei.com>; Zhanghailiang
><zhang.zhanghaili...@huawei.com>
>Subject: Re: [PATCH] xhci: Fix memory leak in xhci_kick_epctx when poweroff
>GuestOS
>
>> > 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.

Hi  Gerd,

I test every keyboard input, it will leak once.   
I tested qemu-4.0.0  also had  this leak .

Maybe  we should cc to qemu-stable ?

Thanks.
>
>thanks,
>  Gerd

Reply via email to