* Re: [PATCH] USB: XHCI: fix memory leak of URB-private data [not found] <Pine.LNX.4.44L0.1301171031260.1339-100000@iolanthe.rowland.org> @ 2013-01-24 21:53 ` Martin Mokrejs 2013-01-24 21:57 ` Greg KH 0 siblings, 1 reply; 4+ messages in thread From: Martin Mokrejs @ 2013-01-24 21:53 UTC (permalink / raw) To: Alan Stern; +Cc: Sarah Sharp, LKML, USB list, Greg KH 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 > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] USB: XHCI: fix memory leak of URB-private data 2013-01-24 21:53 ` [PATCH] USB: XHCI: fix memory leak of URB-private data Martin Mokrejs @ 2013-01-24 21:57 ` Greg KH 2013-01-24 22:08 ` Sarah Sharp 2013-01-24 22:18 ` Martin Mokrejs 0 siblings, 2 replies; 4+ messages in thread From: Greg KH @ 2013-01-24 21:57 UTC (permalink / raw) To: Martin Mokrejs; +Cc: Alan Stern, Sarah Sharp, LKML, USB list On Thu, Jan 24, 2013 at 10:53:25PM +0100, Martin Mokrejs wrote: > 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@"? ;-) No. It's because the patch isn't in Linus's tree yet, which is one of the requirements for a patch to be able to get into the stable kernel releases. Please read the kernel file, Documentation/stable_kernel_rules.txt for more details if you are curious. Hope this helps, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] USB: XHCI: fix memory leak of URB-private data 2013-01-24 21:57 ` Greg KH @ 2013-01-24 22:08 ` Sarah Sharp 2013-01-24 22:18 ` Martin Mokrejs 1 sibling, 0 replies; 4+ messages in thread From: Sarah Sharp @ 2013-01-24 22:08 UTC (permalink / raw) To: Greg KH; +Cc: Martin Mokrejs, Alan Stern, LKML, USB list On Thu, Jan 24, 2013 at 01:57:07PM -0800, Greg KH wrote: > On Thu, Jan 24, 2013 at 10:53:25PM +0100, Martin Mokrejs wrote: > > 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@"? ;-) > > No. It's because the patch isn't in Linus's tree yet, which is one of > the requirements for a patch to be able to get into the stable kernel > releases. I'm sending it to Greg today after I test it (and the rest of my queue) out. It will be in the stable trees after it hits Linus' tree. Sarah Sharp ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] USB: XHCI: fix memory leak of URB-private data 2013-01-24 21:57 ` Greg KH 2013-01-24 22:08 ` Sarah Sharp @ 2013-01-24 22:18 ` Martin Mokrejs 1 sibling, 0 replies; 4+ messages in thread From: Martin Mokrejs @ 2013-01-24 22:18 UTC (permalink / raw) To: Greg KH; +Cc: Martin Mokrejs, Alan Stern, Sarah Sharp, LKML, USB list Greg KH wrote: > On Thu, Jan 24, 2013 at 10:53:25PM +0100, Martin Mokrejs wrote: >> 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@"? ;-) > > No. It's because the patch isn't in Linus's tree yet, which is one of > the requirements for a patch to be able to get into the stable kernel > releases. > > Please read the kernel file, Documentation/stable_kernel_rules.txt for > more details if you are curious. Thank you Greg! Aside from the fact that I do not know how much serious a memleak is and whether it is eligible for -stable. Other than that, it was helpful to read the file. Will see what happens. Meanwhile will continue running my patched kernel. ;-) Martin ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-24 22:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.44L0.1301171031260.1339-100000@iolanthe.rowland.org>
2013-01-24 21:53 ` [PATCH] USB: XHCI: fix memory leak of URB-private data Martin Mokrejs
2013-01-24 21:57 ` Greg KH
2013-01-24 22:08 ` Sarah Sharp
2013-01-24 22:18 ` Martin Mokrejs
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox