linux/sound
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
..
aoa sound/aoa: Adapt to new i2c probing scheme 2012-07-11 18:22:48 +10:00
arm ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM 2012-08-09 15:47:15 +02:00
atmel ALSA: sound/atmel/ac97c.c: fix error return code 2012-08-20 10:56:01 +02:00
core ALSA: PCM: Fix some races at disconnection 2012-10-30 11:06:48 +01:00
drivers ALSA: aloop - add locking to timer access 2012-10-06 16:50:28 +02:00
firewire
i2c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-10-07 17:49:05 +09:00
isa ALSA: sound/isa/opti9xx/miro.c: eliminate possible double free 2012-10-21 14:17:43 +02:00
mips
oss ARM: SoC fixes 2012-10-11 10:21:48 +09:00
parisc
pci ALSA: hda - Fix mute-LED setup for HP dv5 laptop 2012-10-26 16:57:28 +02:00
pcmcia
ppc ALSA: sound/ppc/snd_ps3.c: fix error return code 2012-08-20 11:01:14 +02:00
sh
soc ASoC: Fixes for v3.7 2012-10-28 09:55:01 +01:00
sparc sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
spi
synth
usb ALSA: usb-audio: Fix races at disconnection 2012-10-30 11:06:54 +01:00
ac97_bus.c
Kconfig
last.c ALSA: Remove the last mention of SNDRV_MAIN_OBJECT_FILE 2012-09-03 10:07:23 +02:00
Makefile
sound_core.c
sound_firmware.c sound_firmware: don't pass crap to filp_close() 2012-07-29 21:24:22 +04:00