+ usb-fix-possible-memory-leak-in-pxa27x_udc.patch added to -mm tree

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

 



The patch titled
     usb: fix possible memory leak in pxa27x_udc
has been added to the -mm tree.  Its filename is
     usb-fix-possible-memory-leak-in-pxa27x_udc.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: usb: fix possible memory leak in pxa27x_udc
From: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>

Fix memory leak when _ep is null.
http://bugzilla.kernel.org/show_bug.cgi?id=10660

Reported-by: Daniel Marjamaki <danielm77@xxxxxxxx>
Signed-off-by: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
Cc: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/usb/gadget/pxa27x_udc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -puN drivers/usb/gadget/pxa27x_udc.c~usb-fix-possible-memory-leak-in-pxa27x_udc drivers/usb/gadget/pxa27x_udc.c
--- a/drivers/usb/gadget/pxa27x_udc.c~usb-fix-possible-memory-leak-in-pxa27x_udc
+++ a/drivers/usb/gadget/pxa27x_udc.c
@@ -650,8 +650,11 @@ pxa_ep_alloc_request(struct usb_ep *_ep,
 {
 	struct pxa27x_request *req;
 
+	if (!_ep)
+		return NULL;
+
 	req = kzalloc(sizeof *req, gfp_flags);
-	if (!req || !_ep)
+	if (!req)
 		return NULL;
 
 	INIT_LIST_HEAD(&req->queue);
_

Patches currently in -mm which might be from marcin.slusarz@xxxxxxxxx are

vfs-fix-err_ptr-abuse-in-generic_readlink.patch
usb-fix-possible-memory-leak-in-pxa27x_udc.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux