linux/sound/core
Takashi Iwai 00a399cad1 ALSA: pcm: Revert capture stream behavior change in blocking mode
In the commit 62ba568f7a ("ALSA: pcm: Return 0 when size <
start_threshold in capture"), we changed the behavior of
__snd_pcm_lib_xfer() to return immediately with 0 when a capture
stream has a high start_threshold.  This was intended to be a
correction of the behavior consistency and looked harmless, but this
was the culprit of the recent breakage reported by syzkaller, which
was fixed by the commit e190161f96 ("ALSA: pcm: Fix tight loop of
OSS capture stream").

At the time for the OSS fix, I didn't touch the behavior for ALSA
native API, as assuming that this behavior actually is good.  But this
turned out to be also broken actually for a similar deployment,
e.g. one thread goes to a write loop in blocking mode while another
thread controls the start/stop of the stream manually.

Overall, the original commit is harmful, and it brings less merit to
keep that behavior.  Let's revert it.

Fixes: 62ba568f7a ("ALSA: pcm: Return 0 when size < start_threshold in capture")
Fixes: e190161f96 ("ALSA: pcm: Fix tight loop of OSS capture stream")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-02-08 16:54:31 +01:00
..
oss ALSA: oss: Use kvzalloc() for local buffer allocations 2018-11-09 14:12:04 +01:00
seq Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
Kconfig
Makefile
compress_offload.c ALSA: compress: prevent potential divide by zero bugs 2019-01-03 16:32:57 +00:00
control.c ALSA: control: Consolidate helpers for adding and replacing ctl elements 2018-11-24 20:04:10 +01:00
control_compat.c
ctljack.c
device.c
hrtimer.c
hwdep.c
hwdep_compat.c
info.c
info_oss.c
init.c
isadma.c
jack.c
memalloc.c ALSA: memalloc: Add fall-through annotation 2018-10-12 09:31:23 +02:00
memory.c
misc.c
pcm.c ALSA: pcm: Fix potential Spectre v1 vulnerability 2018-12-13 09:14:33 +01:00
pcm_compat.c
pcm_dmaengine.c
pcm_drm_eld.c
pcm_iec958.c
pcm_lib.c ALSA: pcm: Revert capture stream behavior change in blocking mode 2019-02-08 16:54:31 +01:00
pcm_local.h
pcm_memory.c
pcm_misc.c
pcm_native.c ALSA: pcm: Fix starvation on down_write_nonblock() 2018-11-29 08:15:19 +01:00
pcm_param_trace.h
pcm_timer.c
pcm_trace.h
rawmidi.c ALSA: rawmidi: A lightweight function to discard pending bytes 2018-10-04 20:13:17 +02:00
rawmidi_compat.c
seq_device.c
sgbuf.c ALSA: memalloc: Add non-cached buffer type 2018-08-28 13:56:47 +02:00
sound.c
sound_oss.c
timer.c ALSA: timer: catch invalid timer object creation 2018-07-22 10:42:41 +02:00
timer_compat.c
vmaster.c