ALSA: emu10k1: don't deadlock in proc-functions
authorMichael Gernoth <michael@gernoth.net>
Thu, 9 Apr 2015 21:42:15 +0000 (23:42 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:04 +0000 (19:12 -0400)
commitf44e7673bd8a09d4d6d87bbc85afb964d44602dd
tree7da5365621463aab4f98804925c0fccecab0aac2
parentef1eaaef22b0b76506aeeb7ae233d376fab8f817
ALSA: emu10k1: don't deadlock in proc-functions

[ Upstream commit 91bf0c2dcb935a87e5c0795f5047456b965fd143 ]

The functions snd_emu10k1_proc_spdif_read and snd_emu1010_fpga_read
acquire the emu_lock before accessing the FPGA. The function used
to access the FPGA (snd_emu1010_fpga_read) also tries to take
the emu_lock which causes a deadlock.
Remove the outer locking in the proc-functions (guarding only the
already safe fpga read) to prevent this deadlock.

[removed superfluous flags variables too -- tiwai]

Signed-off-by: Michael Gernoth <michael@gernoth.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
sound/pci/emu10k1/emuproc.c