aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/format.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-02-14 18:16:43 +0100
committerTakashi Iwai <tiwai@suse.de>2020-02-14 18:17:13 +0100
commit146f66975bafbcfab349901c9f9c9f521ac96cbb (patch)
tree0463626fdde9562d85dcabb03b85b8bfd929dce0 /sound/usb/format.c
parentALSA: usb-audio: Don't create a mixer element with bogus volume range (diff)
downloadlinux-dev-146f66975bafbcfab349901c9f9c9f521ac96cbb.tar.xz
linux-dev-146f66975bafbcfab349901c9f9c9f521ac96cbb.zip
ALSA: pcm: oss: Unlock mutex temporarily for sleeping at read/write
ALSA PCM OSS layer calls the generic __snd_pcm_lib_xfer() helper for the actual transfer of the audio data. The xfer helper may sleep long for waiting for the enough space becoming empty for read/write, and it does unlock/relock for the substream lock. This works fine, so far, but a slight problem specific to OSS layer is that OSS layer wraps yet more mutex (runtime->oss.params_lock) over __snd_pcm_lib_xfer() call; so this mutex is still locked during a possible long sleep, and it prevents the whole ioctl and other actions applied to the given stream. This patch adds the temporarily unlock and relock of the mutex around __snd_pcm_lib_xfer() call in the OSS layer to be more friendly to the concurrent accesses. The long mutex protection itself shouldn't be a real issue for the normal systems, and its influence appears only on strange things like fuzzers. Link: https://lore.kernel.org/r/20200214171643.26212-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/format.c')
0 files changed, 0 insertions, 0 deletions