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 IEEE 1394 (FireWire) subsystem updates post v3.4: 2012-05-24 12:57:47 -07:00
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 ALSA: Convert mips directory to module_platform_driver 2011-11-24 13:03:02 +01:00
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 ALSA: pdaudiocf: Remove superfluous pm_message_t argument from suspend 2012-07-03 08:23:08 +02:00
ppc ALSA: sound/ppc/snd_ps3.c: fix error return code 2012-08-20 11:01:14 +02:00
sh ALSA: Add missing .owner=THIS_MODULE to platform_driver definitions 2012-07-02 17:50:05 +02:00
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 ALSA: Convert at73c213 to module_spi_driver 2012-01-27 15:18:36 +01:00
synth sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where needed 2011-10-31 19:31:22 -04:00
usb ALSA: usb-audio: Fix races at disconnection 2012-10-30 11:06:54 +01:00
Kconfig um: switch to use of drivers/Kconfig 2011-11-02 14:15:41 +01:00
Makefile ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver 2011-03-15 08:42:22 +01:00
ac97_bus.c
last.c ALSA: Remove the last mention of SNDRV_MAIN_OBJECT_FILE 2012-09-03 10:07:23 +02:00
sound_core.c sound: allow the unit search until 256 in sound_core.c 2012-05-08 17:27:03 +02:00
sound_firmware.c sound_firmware: don't pass crap to filp_close() 2012-07-29 21:24:22 +04:00