linux-stable/sound/core
Takashi Iwai 2759caad26 ALSA: seq: oss: Avoid mutex lock for a long-time ioctl
Recently we applied a fix to cover the whole OSS sequencer ioctls with
the mutex for dealing with the possible races.  This works fine in
general, but in theory, this may lead to unexpectedly long stall if an
ioctl like SNDCTL_SEQ_SYNC is issued and an event with the far future
timestamp was queued.

For fixing such a potential stall, this patch changes the mutex lock
applied conditionally excluding such an ioctl command.  Also, change
the mutex_lock() with the interruptible version for user to allow
escaping from the big-hammer mutex.

Fixes: 80982c7e83 ("ALSA: seq: oss: Serialize ioctls")
Suggested-by: Pavel Machek <pavel@ucw.cz>
Link: https://lore.kernel.org/r/20200922083856.28572-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-09-23 14:45:14 +02:00
..
oss
seq ALSA: seq: oss: Avoid mutex lock for a long-time ioctl 2020-09-23 14:45:14 +02:00
compress_offload.c ALSA: compress_offload: remove redundant initialization 2020-09-03 09:26:27 +02:00
control.c ALSA: ctl: Workaround for lockdep warning wrt card->ctl_files_rwlock 2020-09-22 11:07:10 +02:00
control_compat.c ALSA: compat_ioctl: avoid compat_alloc_user_space 2020-09-21 10:37:07 +02:00
ctljack.c
device.c
hrtimer.c ALSA: timer: Replace tasklet with work 2020-09-09 18:32:52 +02:00
hwdep.c ALSA: compat_ioctl: avoid compat_alloc_user_space 2020-09-21 10:37:07 +02:00
hwdep_compat.c ALSA: compat_ioctl: avoid compat_alloc_user_space 2020-09-21 10:37:07 +02:00
info.c
info_oss.c
init.c ALSA: core: init: use DECLARE_COMPLETION_ONSTACK() macro 2020-09-03 09:26:38 +02:00
isadma.c
jack.c
Kconfig
Makefile
memalloc.c ALSA: core: memalloc: fix fallthrough position 2020-09-03 09:24:49 +02:00
memory.c
misc.c
pcm.c ALSA: core: pcm: simplify locking for timers 2020-09-03 09:24:33 +02:00
pcm_compat.c
pcm_dmaengine.c
pcm_drm_eld.c
pcm_iec958.c
pcm_lib.c
pcm_local.h
pcm_memory.c ALSA: core: pcm_memory: dereference pointer after NULL checks 2020-09-03 09:24:58 +02:00
pcm_misc.c
pcm_native.c
pcm_param_trace.h
pcm_timer.c
pcm_trace.h
rawmidi.c ALSA: rawmidi: (cosmetic) align function parameters 2020-09-03 09:27:44 +02:00
rawmidi_compat.c
seq_device.c
sgbuf.c
sound.c
sound_oss.c
timer.c ALSA: timer: Replace tasklet with work 2020-09-09 18:32:52 +02:00
timer_compat.c
vmaster.c