Patch "usb: gadget: composite: Fix function used to free memory" has been added to the 4.9-stable tree
Subsystems (2)
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 <[email protected]> know about it.
Quoted 1 line
From
990758c53eafe5a220a780ed12e7b4d51b3df032Mon Sep 17 00:00:00 2001
From: Christophe JAILLET <[email protected]>
Date: Wed, 4 Jan 2017 06:30:16 +0100
Subject: usb: gadget: composite: Fix function used to free memory
From: Christophe JAILLET <[email protected]>
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.
--- drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/composite.c +1 -1
@@ -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 [email protected] 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