summaryrefslogtreecommitdiff
path: root/debian.ti-omap4/abi/3.4.0-1489.10/armhf/omap4.modules
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-13 11:22:48 +0100
committerXavier Boudet <x-boudet@ti.com>2012-11-19 10:21:31 +0100
commit2a682e70adc69b6b6633f345170a7f0604d67c8f (patch)
tree6b6a84e984519b51471f26949258bcd0651bf65a /debian.ti-omap4/abi/3.4.0-1489.10/armhf/omap4.modules
parentd7972057f488c5e600124d12287de8b8944a8cd4 (diff)
ALSA: usb-audio: Fix mutex deadlock at disconnection
commit 10e44239f67d0b6fb74006e61a7e883b8075247a upstream. The recent change for USB-audio disconnection race fixes introduced a mutex deadlock again. There is a circular dependency between chip->shutdown_rwsem and pcm->open_mutex, depicted like below, when a device is opened during the disconnection operation: A. snd_usb_audio_disconnect() -> card.c::register_mutex -> chip->shutdown_rwsem (write) -> snd_card_disconnect() -> pcm.c::register_mutex -> pcm->open_mutex B. snd_pcm_open() -> pcm->open_mutex -> snd_usb_pcm_open() -> chip->shutdown_rwsem (read) Since the chip->shutdown_rwsem protection in the case A is required only for turning on the chip->shutdown flag and it doesn't have to be taken for the whole operation, we can reduce its window in snd_usb_audio_disconnect(). Reported-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'debian.ti-omap4/abi/3.4.0-1489.10/armhf/omap4.modules')
0 files changed, 0 insertions, 0 deletions