linux/sound/synth/emux
Takashi Iwai 07b0e5d49d ALSA: emux: Fix mutex deadlock at unloading
The emux-synth driver has a possible AB/BA mutex deadlock at unloading
the emu10k1 driver:

  snd_emux_free() ->
    snd_emux_detach_seq(): mutex_lock(&emu->register_mutex) ->
      snd_seq_delete_kernel_client() ->
        snd_seq_free_client(): mutex_lock(&register_mutex)

  snd_seq_release() ->
    snd_seq_free_client(): mutex_lock(&register_mutex) ->
      snd_seq_delete_all_ports() ->
        snd_emux_unuse(): mutex_lock(&emu->register_mutex)

Basically snd_emux_detach_seq() doesn't need a protection of
emu->register_mutex as it's already being unregistered.  So, we can
get rid of this for avoiding the deadlock.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27 14:50:39 +02:00
..
emux_effect.c [ALSA] Remove xxx_t typedefs: Emu-X synth 2006-01-03 12:18:14 +01:00
emux_hwdep.c ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/* 2015-01-28 17:25:07 +01:00
emux_nrpn.c ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
emux_oss.c ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/* 2015-01-28 17:25:07 +01:00
emux_proc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
emux_seq.c ALSA: emux: Fix mutex deadlock at unloading 2015-04-27 14:50:39 +02:00
emux_synth.c ALSA: emux: Use setup_timer() and mod_timer() 2015-01-19 11:41:13 +01:00
emux_voice.h [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
emux.c ALSA: emux: Use setup_timer() and mod_timer() 2015-01-19 11:41:13 +01:00
Makefile ALSA: clean up the logic for building sequencer modules 2009-05-29 11:49:42 +02:00
soundfont.c ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/* 2015-01-28 17:25:07 +01:00