]> 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)
commit6d5147b69b0af01d7f46c572ffcd1883df837e2e
tree0f8fb5ae4e57b0858333a86e7412d02de6a5999e
parentcbc3231eab8306359ae115097296dbd6c0cc0ab1
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 aa1719f538aa ("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: aa1719f538aa ("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