Skip to content
Commit bcab3a6e authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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 68b4acd3 ("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: 68b4acd3 ("ALSA: pcm: Apply power lock globally to common ioctls")
Reported-and-tested-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9ce76511
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment