https://github.com/torvalds/linux
Revision bcab3a6e64a9647e022b46182c9687a8c3aa9d11 authored by Takashi Iwai on 30 August 2017, 12:50:07 UTC, committed by Takashi Iwai on 30 August 2017, 13:10:12 UTC
PCM OSS emulation issues the drain ioctl without power lock.  It used
to work in the earlier kernels as the power lock was taken inside
snd_pcm_drain() itself.  But since 68b4acd32249 ("ALSA: pcm: Apply
power lock globally to common ioctls"), the power lock is taken
outside the function.  Due to that change, the call via OSS emulation
leads to the unbalanced power lock, thus it deadlocks.

As a quick fix, just take the power lock before snd_pcm_drain() call
for OSS emulation path.  A better cleanup will follow later.

Fixes: 68b4acd32249 ("ALSA: pcm: Apply power lock globally to common ioctls")
Reported-and-tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 9ce7651
History
Tip revision: bcab3a6e64a9647e022b46182c9687a8c3aa9d11 authored by Takashi Iwai on 30 August 2017, 12:50:07 UTC
ALSA: pcm: Fix power lock unbalance via OSS emulation
Tip revision: bcab3a6
File Mode Size
Kconfig -rw-r--r-- 58.6 KB
Makefile -rw-r--r-- 1.2 KB
calibrate.c -rw-r--r-- 8.5 KB
do_mounts.c -rw-r--r-- 14.6 KB
do_mounts.h -rw-r--r-- 1.1 KB
do_mounts_initrd.c -rw-r--r-- 3.4 KB
do_mounts_md.c -rw-r--r-- 8.2 KB
do_mounts_rd.c -rw-r--r-- 8.3 KB
init_task.c -rw-r--r-- 802 bytes
initramfs.c -rw-r--r-- 14.0 KB
main.c -rw-r--r-- 26.2 KB
noinitramfs.c -rw-r--r-- 1.5 KB
version.c -rw-r--r-- 1.2 KB

back to top