From: Mathias Nyman <mathias.nyman@intel.com>
To: iq_132@sina.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Zheng Xiaowei <zhengxiaowei@ruijie.com.cn>
Subject: Re: [PATCH] usb: xhci: Fix memory leak in xhci_endpoint_reset()
Date: Fri, 20 Jul 2018 11:17:59 +0300 [thread overview]
Message-ID: <fec4a873-9367-9289-9e49-20cad7387f77@intel.com> (raw)
In-Reply-To: <1531120365-44810-1-git-send-email-iq_132@sina.com>
On 09.07.2018 10:12, iq_132@sina.com wrote:
>
> From: Zheng Xiaowei <zhengxiaowei@ruijie.com.cn>
>
> If td_list is not empty the cfg_cmd will not be freed,
> call xhci_free_command to free it.
>
> Signed-off-by: Zheng Xiaowei <zhengxiaowei@ruijie.com.cn>
> ---
> drivers/usb/host/xhci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 2f4850f..68e6132 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -3051,6 +3051,7 @@ static void xhci_endpoint_reset(struct usb_hcd *hcd,
> if (!list_empty(&ep->ring->td_list)) {
> dev_err(&udev->dev, "EP not empty, refuse reset\n");
> spin_unlock_irqrestore(&xhci->lock, flags);
> + xhci_free_command(xhci, cfg_cmd);
> goto cleanup;
> }
> xhci_queue_stop_endpoint(xhci, stop_cmd, udev->slot_id, ep_index, 0);
>
Thanks, adding to queue
-Mathias
parent reply other threads:[~2018-07-20 8:16 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1531120365-44810-1-git-send-email-iq_132@sina.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fec4a873-9367-9289-9e49-20cad7387f77@intel.com \
--to=mathias.nyman@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=iq_132@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=zhengxiaowei@ruijie.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®