]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Fix power lock unbalance via OSS emulation
authorTakashi Iwai <tiwai@suse.de>
Wed, 30 Aug 2017 12:50:07 +0000 (14:50 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 30 Aug 2017 13:10:12 +0000 (15:10 +0200)
commitf3ef1b29ee194492d71f9abd91ea24d6302fd087
tree0f8fb5ae4e57b0858333a86e7412d02de6a5999e
parentc7bd3757c990917b972cf10463ac66794eba2581
ALSA: pcm: Fix power lock unbalance via OSS emulation

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 aeba22ee646a ("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: aeba22ee646a ("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>
sound/core/pcm_native.c