linux/sound/usb
Takashi Iwai 978520b75f ALSA: usb-audio: Fix races at disconnection
Close some races at disconnection of a USB audio device by adding the
chip->shutdown_mutex and chip->shutdown check at appropriate places.

The spots to put bandaids are:
- PCM prepare, hw_params and hw_free
- where the usb device is accessed for communication or get speed, in
 mixer.c and others; the device speed is now cached in subs->speed
 instead of accessing to chip->dev

The accesses in PCM open and close don't need the mutex protection
because these are already handled in the core PCM disconnection code.

The autosuspend/autoresume codes are still uncovered by this patch
because of possible mutex deadlocks.  They'll be covered by the
upcoming change to rwsem.

Also the mixer codes are untouched, too.  These will be fixed in
another patch, too.

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-30 11:06:54 +01:00
..
6fire
caiaq
misc
usx2y mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
card.c ALSA: usb-audio: Avoid unnecessary EP setups in prepare 2012-09-19 08:08:16 +02:00
card.h ALSA: usb-audio: Fix races at disconnection 2012-10-30 11:06:54 +01:00
clock.c
clock.h
debug.h
endpoint.c Sound updates for 3.7-rc1 2012-10-09 07:07:14 +09:00
endpoint.h ALSA: usb-audio: Don't require hw_params in endpoint. 2012-09-19 08:07:52 +02:00
format.c
format.h
helper.c
helper.h
Kconfig
Makefile
midi.c
midi.h
mixer_maps.c
mixer_quirks.c
mixer_quirks.h
mixer.c ALSA: usb-audio: Fix races at disconnection 2012-10-30 11:06:54 +01:00
mixer.h
pcm.c ALSA: usb-audio: Fix races at disconnection 2012-10-30 11:06:54 +01:00
pcm.h
power.h
proc.c ALSA: usb-audio: Fix races at disconnection 2012-10-30 11:06:54 +01:00
proc.h
quirks-table.h ALSA: usb-audio: Add TASCAM US122 MKII playback 2012-10-08 15:16:33 +02:00
quirks.c
quirks.h
stream.c ALSA: usb-audio: Fix races at disconnection 2012-10-30 11:06:54 +01:00
stream.h
usbaudio.h