linux-stable/drivers/usb
Thilo-Alexander Ginkel 53b63616b3 usb: cdc-acm: Fix acm_tty_hangup() vs. acm_tty_close() race
[Not upstream s it was fixed differently there for 3.3 with a much more
"intrusive" rework of the driver - gregkh]

There is a race condition involving acm_tty_hangup() and acm_tty_close()
where hangup() would attempt to access tty->driver_data without proper
locking and NULL checking after close() has potentially already set it
to NULL.  One possibility to (sporadically) trigger this behavior is to
perform a suspend/resume cycle with a running WWAN data connection.

This patch addresses the issue by introducing a NULL check for
tty->driver_data in acm_tty_hangup() protected by open_mutex and exiting
gracefully when hangup() is invoked on a device that has already been
closed.

Signed-off-by: Thilo-Alexander Ginkel <thilo@ginkel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-12 11:33:46 -08:00
..
atm drivers: usb: atm: ueagle-atm: Add missing const qualifier 2011-07-08 14:51:30 -07:00
c67x00 Fix common misspellings 2011-03-31 11:26:23 -03:00
class usb: cdc-acm: Fix acm_tty_hangup() vs. acm_tty_close() race 2012-01-12 11:33:46 -08:00
core usb: fix number of mapped SG DMA entries 2012-01-12 11:33:35 -08:00
early USB: EHCI: Support controllers with big endian capability regs 2011-05-03 11:43:21 -07:00
gadget USB: pch_udc: Support new device LAPIS Semiconductor ML7831 IOH 2011-11-26 09:08:38 -08:00
host OHCI: final fix for NVIDIA problems (I hope) 2012-01-12 11:33:40 -08:00
image atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
misc USB: isight: fix kernel bug when loading firmware 2012-01-12 11:33:26 -08:00
mon usbmon vs. tcpdump: fix dropped packet count 2011-11-11 09:42:35 -08:00
musb usb: musb: fix pm_runtime mismatch 2012-01-12 11:33:31 -08:00
otg Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2011-07-25 23:08:32 -07:00
renesas_usbhs usb: gadget: renesas_usbhs: fix DMA build by including dma-mapping.h 2011-08-12 11:52:48 +03:00
serial usb: option: add ZD Incorporated HSPA modem 2012-01-12 11:33:38 -08:00
storage usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops 2012-01-12 11:33:28 -08:00
wusbcore atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
Kconfig usb: renesas_usbhs: compile/config are rescued 2011-07-08 14:57:12 -07:00
Makefile USB: fix build of FSL MPH DR OF platform driver 2011-05-02 16:59:37 -07:00
README USB: fix directory references in usb/README 2007-11-28 13:58:34 -08:00
usb-skeleton.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00

To understand all the Linux-USB framework, you'll use these resources:

    * This source code.  This is necessarily an evolving work, and
      includes kerneldoc that should help you get a current overview.
      ("make pdfdocs", and then look at "usb.pdf" for host side and
      "gadget.pdf" for peripheral side.)  Also, Documentation/usb has
      more information.

    * The USB 2.0 specification (from www.usb.org), with supplements
      such as those for USB OTG and the various device classes.
      The USB specification has a good overview chapter, and USB
      peripherals conform to the widely known "Chapter 9".

    * Chip specifications for USB controllers.  Examples include
      host controllers (on PCs, servers, and more); peripheral
      controllers (in devices with Linux firmware, like printers or
      cell phones); and hard-wired peripherals like Ethernet adapters.

    * Specifications for other protocols implemented by USB peripheral
      functions.  Some are vendor-specific; others are vendor-neutral
      but just standardized outside of the www.usb.org team.

Here is a list of what each subdirectory here is, and what is contained in
them.

core/		- This is for the core USB host code, including the
		  usbfs files and the hub class driver ("khubd").

host/		- This is for USB host controller drivers.  This
		  includes UHCI, OHCI, EHCI, and others that might
		  be used with more specialized "embedded" systems.

gadget/		- This is for USB peripheral controller drivers and
		  the various gadget drivers which talk to them.


Individual USB driver directories.  A new driver should be added to the
first subdirectory in the list below that it fits into.

image/		- This is for still image drivers, like scanners or
		  digital cameras.
../input/	- This is for any driver that uses the input subsystem,
		  like keyboard, mice, touchscreens, tablets, etc.
../media/	- This is for multimedia drivers, like video cameras,
		  radios, and any other drivers that talk to the v4l
		  subsystem.
../net/		- This is for network drivers.
serial/		- This is for USB to serial drivers.
storage/	- This is for USB mass-storage drivers.
class/		- This is for all USB device drivers that do not fit
		  into any of the above categories, and work for a range
		  of USB Class specified devices. 
misc/		- This is for all USB device drivers that do not fit
		  into any of the above categories.