linux-sg2042/drivers/usb/class
Havard Skinnemoen 5dc2470c60 USB: cdc-acm: Fix disconnect() vs close() race
There's a race between the USB disconnect handler and the TTY close
handler which may cause the acm object to be freed while it's still
being used. This may lead to things like

http://article.gmane.org/gmane.linux.usb.general/54250

and

https://lkml.org/lkml/2011/5/29/64

This is the simplest fix I could come up with. Holding on to open_mutex
while closing the TTY device prevents acm_disconnect() from freeing the
acm object between acm->port.count drops to 0 and the TTY side of the
cleanups are finalized.

Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14 13:47:49 -08:00
..
Kconfig USB: add USB test and measurement class driver 2008-10-17 14:40:51 -07:00
Makefile USB: add USB test and measurement class driver 2008-10-17 14:40:51 -07:00
cdc-acm.c USB: cdc-acm: Fix disconnect() vs close() race 2011-11-14 13:47:49 -08:00
cdc-acm.h USB: cdc_acm: Fix oops when Droids MuIn LCD is connected 2011-05-11 15:14:28 -07:00
cdc-wdm.c Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2011-10-25 15:18:39 +02:00
usblp.c usb/class: use printk_ratelimited() instead of printk_ratelimit() 2011-07-01 14:43:24 -07:00
usbtmc.c USB: use usb_endpoint_maxp() instead of le16_to_cpu() 2011-08-23 09:47:40 -07:00