From: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>,
Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] USB: XHCI: fix memory leak of URB-private data
Date: Thu, 24 Jan 2013 22:53:25 +0100 [thread overview]
Message-ID: <5101AD55.2000008@fold.natur.cuni.cz> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1301171031260.1339-100000@iolanthe.rowland.org>
Hi Sarah and Alan,
I just saw 3.7.5 patches announced by Greg but I don't see this path in there.
And, don't know but maybe this applies to older stable kernels as well?
Where will this patch posted originally to linux-usb land?
Ah, is that because the email was actually NOT sent to "stable@"? ;-)
Date: Thu, 17 Jan 2013 10:32:16 -0500 (EST)
From: Alan Stern <stern@rowland.harvard.edu>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>
cc: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>,
USB list <linux-usb@vger.kernel.org>
Subject: [PATCH] USB: XHCI: fix memory leak of URB-private data
Message-ID: <Pine.LNX.4.44L0.1301171031260.1339-100000@iolanthe.rowland.org>
Thank you,
Martin
Alan Stern wrote:
> This patch (as1640) fixes a memory leak in xhci-hcd. The urb_priv
> data structure isn't always deallocated in the handle_tx_event()
> routine for non-control transfers. The patch adds a kfree() call so
> that all paths end up freeing the memory properly.
>
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> Reported-and-tested-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
> CC: <stable@vger.kernel.org>
>
> ---
>
> drivers/usb/host/xhci-ring.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> Index: usb-3.7/drivers/usb/host/xhci-ring.c
> ===================================================================
> --- usb-3.7.orig/drivers/usb/host/xhci-ring.c
> +++ usb-3.7/drivers/usb/host/xhci-ring.c
> @@ -2580,6 +2580,8 @@ cleanup:
> (trb_comp_code != COMP_STALL &&
> trb_comp_code != COMP_BABBLE))
> xhci_urb_free_priv(xhci, urb_priv);
> + else
> + kfree(urb_priv);
>
> usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb);
> if ((urb->actual_length != urb->transfer_buffer_length &&
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next parent reply other threads:[~2013-01-24 21:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.1301171031260.1339-100000@iolanthe.rowland.org>
2013-01-24 21:53 ` Martin Mokrejs [this message]
2013-01-24 21:57 ` Greg KH
2013-01-24 22:08 ` Sarah Sharp
2013-01-24 22:18 ` Martin Mokrejs
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=5101AD55.2000008@fold.natur.cuni.cz \
--to=mmokrejs@fold.natur.cuni.cz \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/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®