kernel_samsung_a53x/sound/core
Takashi Iwai 777cf028ca ALSA: timer: Set lower bound of start tick time
commit 4a63bd179fa8d3fcc44a0d9d71d941ddd62f0c4e upstream.

Currently ALSA timer doesn't have the lower limit of the start tick
time, and it allows a very small size, e.g. 1 tick with 1ns resolution
for hrtimer.  Such a situation may lead to an unexpected RCU stall,
where  the callback repeatedly queuing the expire update, as reported
by fuzzer.

This patch introduces a sanity check of the timer start tick time, so
that the system returns an error when a too small start size is set.
As of this patch, the lower limit is hard-coded to 100us, which is
small enough but can still work somehow.

Reported-by: syzbot+43120c2af6ca2938cc38@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/000000000000fa00a1061740ab6d@google.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240514182745.4015-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[ backport note: the error handling is changed, as the original commit
  is based on the recent cleanup with guard() in commit beb45974dd49
  -- tiwai ]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 12:27:11 +01:00
..
oss Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seq ALSA: seq: fix function cast warnings 2024-11-19 08:44:53 +01:00
compress_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
control.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
control_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ctljack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hrtimer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwdep.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwdep_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
info.c ALSA: info: Fix potential deadlock at disconnection 2024-11-18 11:43:26 +01:00
info_oss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
init.c ALSA: core: Fix NULL module pointer assignment at card init 2024-11-19 12:26:51 +01:00
isadma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile ALSA: Drop leftover snd-rtctimer stuff from Makefile 2024-11-18 23:18:29 +01:00
memalloc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
memory.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm.c ALSA: pcm: fix out-of-bounds in snd_pcm_state_names 2024-11-18 12:11:41 +01:00
pcm_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_dmaengine.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_drm_eld.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_iec958.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_lib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_local.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_memory.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_native.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_param_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_timer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rawmidi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rawmidi_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seq_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sgbuf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sound.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sound_oss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timer.c ALSA: timer: Set lower bound of start tick time 2024-11-19 12:27:11 +01:00
timer_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmaster.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00