ALSA: emu10k1: don't deadlock in proc-functions
authorMichael Gernoth <michael@gernoth.net>
Thu, 9 Apr 2015 21:42:15 +0000 (23:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 19:56:23 +0000 (21:56 +0200)
commit6c6f8aac03406e6cba87267a6075b4e3340af892
tree5f6b1582bb2912f36cfd3c601f1ec54bddf06b39
parente217fcc13682beef6eaafbb5a419e6b50ddf94b9
ALSA: emu10k1: don't deadlock in proc-functions

commit 91bf0c2dcb935a87e5c0795f5047456b965fd143 upstream.

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/emu10k1/emuproc.c