linux-stable/sound/synth
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 ALSA: emux: Fix mutex deadlock at unloading 2015-04-27 14:50:39 +02:00
Makefile ALSA: clean up the logic for building sequencer modules 2009-05-29 11:49:42 +02:00
util_mem.c sound: Add module.h to the previously silent sound users 2011-10-31 19:31:21 -04:00