This is a note to let you know that I've just added the patch titled
USB: cdc-wdm: fix memory leak
to the 3.4-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-cdc-wdm-fix-memory-leak.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 2f338c8a1904e2e7aa5a8bd12fb0cf2422d17da4 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Fri, 27 Apr 2012 14:36:37 +0200
Subject: USB: cdc-wdm: fix memory leak
From: Oliver Neukum <[email protected]>
commit 2f338c8a1904e2e7aa5a8bd12fb0cf2422d17da4 upstream.
cleanup() is not called if the last close() comes after
disconnect(). That leads to a memory leak. Rectified
by checking for an earlier disconnect() in release()
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/class/cdc-wdm.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -625,6 +625,8 @@ static int wdm_release(struct inode *ino
kill_urbs(desc);
if (!test_bit(WDM_DISCONNECTING, &desc->flags))
desc->manage_power(desc->intf, 0);
+ else
+ cleanup(desc);
}
mutex_unlock(&wdm_mutex);
return 0;
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/usb-cdc-wdm-remove-from-device-list-on-disconnect.patch
queue-3.4/usb-cdc-wdm-poll-must-return-pollhup-if-device-is-gone.patch
queue-3.4/usb-cdc-wdm-fix-memory-leak.patch
queue-3.4/usb-cdc-wdm-sanitize-error-returns.patch
queue-3.4/usbhid-prevent-deadlock-during-timeout.patch
queue-3.4/usb-cdc-wdm-cannot-use-dev_printk-when-device-is-gone.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html