]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: emu10k1: Fix deadlock in synth voice lookup
authorTakashi Iwai <tiwai@suse.de>
Mon, 13 Oct 2014 21:18:02 +0000 (23:18 +0200)
committerJiri Slaby <jslaby@suse.cz>
Fri, 31 Oct 2014 14:11:27 +0000 (15:11 +0100)
commit348d783dab0f4db707cb98e362d4d2ab959192c4
treea9a301b94252e6e40cc9b12d6238a0b7103f9657
parent493d45eba80eb73cbca0eb809e10813dc612e410
ALSA: emu10k1: Fix deadlock in synth voice lookup

commit 95926035b187cc9fee6fb61385b7da9c28123f74 upstream.

The emu10k1 voice allocator takes voice_lock spinlock.  When there is
no empty stream available, it tries to release a voice used by synth,
and calls get_synth_voice.  The callback function,
snd_emu10k1_synth_get_voice(), however, also takes the voice_lock,
thus it deadlocks.

The fix is simply removing the voice_lock holds in
snd_emu10k1_synth_get_voice(), as this is always called in the
spinlock context.

Reported-and-tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
sound/pci/emu10k1/emu10k1_callback.c