This is a note to let you know that I've just added the patch titled usb: gadget: gadgetfs: Free memory allocated by memdup_user() to the 3.18-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-gadgetfs-free-memory-allocated-by-memdup_user.patch and it can be found in the queue-3.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b44be2462dbe3e23f0aedff64de52a1e8e47a1cd Mon Sep 17 00:00:00 2001 From: Mario Schuknecht <mario.schuknecht@xxxxxxxxxxxxxxx> Date: Tue, 16 Dec 2014 08:58:57 +0100 Subject: usb: gadget: gadgetfs: Free memory allocated by memdup_user() From: Mario Schuknecht <mario.schuknecht@xxxxxxxxxxxxxxx> commit b44be2462dbe3e23f0aedff64de52a1e8e47a1cd upstream. Commit 3b74c73f8d6f053f422e85fce955b61fb181cfe7 switched over to memdup_user() in ep_write() function and removed kfree (kbuf). memdup_user() function allocates memory which is never freed. Fixes: 3b74c73 (usb: gadget: inode: switch over to memdup_user()) Signed-off-by: Mario Schuknecht <mario.schuknecht@xxxxxxxxxxxxxxx> Signed-off-by: Felipe Balbi <balbi@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/gadget/legacy/inode.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/gadget/legacy/inode.c +++ b/drivers/usb/gadget/legacy/inode.c @@ -449,6 +449,7 @@ ep_write (struct file *fd, const char __ data->name, len, (int) value); free1: mutex_unlock(&data->lock); + kfree (kbuf); return value; } Patches currently in stable-queue which might be from mario.schuknecht@xxxxxxxxxxxxxxx are queue-3.18/usb-gadget-gadgetfs-free-memory-allocated-by-memdup_user.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html