kernel-fxtec-pro1x/sound/usb
Takashi Iwai 382225e62b ALSA: usb-audio: fix oops due to cleanup race when disconnecting
When a USB audio device is disconnected, snd_usb_audio_disconnect()
kills all audio URBs.  At the same time, the application, after being
notified of the disconnection, might close the device, in which case
ALSA calls the .hw_free callback, which should free the URBs too.

Commit de1b8b93a0 "[ALSA] Fix hang-up at disconnection of usb-audio"
prevented snd_usb_hw_free() from freeing the URBs to avoid a hang that
resulted from this race, but this introduced another race because the
URB callbacks could now be executed after snd_usb_hw_free() has
returned, and try to access already freed data.

Fix the first race by introducing a mutex to serialize the disconnect
callback and all PCM callbacks that manage URBs (hw_free and hw_params).

Reported-and-tested-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Cc: <stable@kernel.org>
[CL: also serialize hw_params callback]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 08:15:43 +01:00
..
caiaq ALSA: caiaq - Fix possible string-buffer overflow 2011-02-14 22:50:46 +01:00
misc Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2010-05-20 21:26:12 -07:00
usx2y ALSA: snd-usb-us122l: Fix missing NULL checks 2011-01-11 19:50:28 +01:00
card.c ALSA: usb-audio: fix oops due to cleanup race when disconnecting 2011-02-23 08:15:43 +01:00
card.h ALSA: usb-audio: automatically detect feedback format 2010-10-27 09:17:41 +02:00
clock.c ALSA: usb-audio: fix detection of vendor-specific device protocol settings 2010-09-03 22:36:39 +02:00
clock.h ALSA: usb-audio: simplify control interface access 2010-06-23 16:10:23 +02:00
debug.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
endpoint.c Merge branch 'fix/misc' into topic/misc 2010-09-03 22:38:52 +02:00
endpoint.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
format.c ALSA: usb-audio: add Edirol SD-90 PCM support 2011-01-10 16:47:10 +01:00
format.h ALSA: usb-audio: parse more format descriptors with structs 2010-05-27 09:48:31 +02:00
helper.c ALSA: usb: USB3 SuperSpeed sound support 2010-08-14 10:30:08 +02:00
helper.h ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE 2010-06-11 18:05:38 +02:00
Kconfig ALSA: snd-usb-caiaq: Add support for Traktor Kontrol S4 2010-09-10 11:08:39 +02:00
Makefile ALSA: usb-audio: parse clock topology of UAC2 devices 2010-05-31 18:16:59 +02:00
midi.c ALSA: snd-usb-us122l: Fix MIDI output 2011-01-11 19:48:58 +01:00
midi.h ALSA: usb-audio: add support for Akai MPD16 2010-05-21 17:12:30 +02:00
mixer.c ALSA: usbaudio - Enable the E-MU 0204 USB 2011-02-08 08:36:04 +01:00
mixer.h ALSA: usb-audio: simplify control interface access 2010-06-23 16:10:23 +02:00
mixer_maps.c ALSA: usb-audio: unify constants from specification 2010-05-31 18:17:22 +02:00
mixer_quirks.c ALSA: usb-audio - Support for Power/Status LED on Creative USB X-Fi S51 2010-11-02 12:40:11 +01:00
mixer_quirks.h ALSA: usb-mixer: factor out quirks 2010-03-12 12:20:26 +01:00
pcm.c ALSA: usb-audio: fix oops due to cleanup race when disconnecting 2011-02-23 08:15:43 +01:00
pcm.h ALSA: usb-audio: simplify control interface access 2010-06-23 16:10:23 +02:00
proc.c ALSA: usb-audio: automatically detect feedback format 2010-10-27 09:17:41 +02:00
proc.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
quirks-table.h ALSA: usbaudio - Enable the E-MU 0204 USB 2011-02-08 08:36:04 +01:00
quirks.c ALSA: usbaudio - Enable the E-MU 0204 USB 2011-02-08 08:36:04 +01:00
quirks.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
urb.c ALSA: usb-audio: automatically detect feedback format 2010-10-27 09:17:41 +02:00
urb.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
usbaudio.h ALSA: usb-audio: fix oops due to cleanup race when disconnecting 2011-02-23 08:15:43 +01:00