]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Allow aborting mutex lock at OSS read/write loops
authorTakashi Iwai <tiwai@suse.de>
Mon, 8 Jan 2018 13:03:53 +0000 (14:03 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 8 Jan 2018 15:40:26 +0000 (16:40 +0100)
commitfdf34793115fe0fe3f7de3dfd620fa356c0c9ac2
tree844ccba051c0491b8e7d74879e6a8d20f11c6e53
parent28fba439ee2be801628a14199f81e1164853776f
ALSA: pcm: Allow aborting mutex lock at OSS read/write loops

PCM OSS read/write loops keep taking the mutex lock for the whole
read/write, and this might take very long when the exceptionally high
amount of data is given.  Also, since it invokes with mutex_lock(),
the concurrent read/write becomes unbreakable.

This patch tries to address these issues by replacing mutex_lock()
with mutex_lock_interruptible(), and also splits / re-takes the lock
at each read/write period chunk, so that it can switch the context
more finely if requested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_oss.c