* Patch "usb: gadget: composite: Fix function used to free memory" has been added to the 4.9-stable tree
@ 2017-06-18 10:59 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-18 10:59 UTC (permalink / raw)
To: christophe.jaillet, alexander.levin, felipe.balbi, gregkh
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
usb: gadget: composite: Fix function used to free memory
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-gadget-composite-fix-function-used-to-free-memory.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 990758c53eafe5a220a780ed12e7b4d51b3df032 Mon Sep 17 00:00:00 2001
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Wed, 4 Jan 2017 06:30:16 +0100
Subject: usb: gadget: composite: Fix function used to free memory
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
commit 990758c53eafe5a220a780ed12e7b4d51b3df032 upstream.
'cdev->os_desc_req' has been allocated with 'usb_ep_alloc_request()' so
'usb_ep_free_request()' should be used to free it.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/gadget/composite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -2147,7 +2147,7 @@ int composite_os_desc_req_prepare(struct
cdev->os_desc_req->buf = kmalloc(4096, GFP_KERNEL);
if (!cdev->os_desc_req->buf) {
ret = -ENOMEM;
- kfree(cdev->os_desc_req);
+ usb_ep_free_request(ep0, cdev->os_desc_req);
goto end;
}
cdev->os_desc_req->context = cdev;
Patches currently in stable-queue which might be from christophe.jaillet@wanadoo.fr are
queue-4.9/vb2-fix-an-off-by-one-error-in-vb2_plane_vaddr.patch
queue-4.9/usb-gadget-composite-fix-function-used-to-free-memory.patch
queue-4.9/serial-efm32-fix-parity-management-in-efm32_uart_console_get_options.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-18 10:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-18 10:59 Patch "usb: gadget: composite: Fix function used to free memory" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).