android_kernel_xiaomi_sm7250/sound/core
Takashi Iwai bbd411d70b ALSA: seq: oss: Avoid mutex lock for a long-time ioctl
[ Upstream commit 2759caad2600d503c3b0ed800e7e03d2cd7a4c05 ]

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: 80982c7e834e ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:55:11 +01:00
..
oss ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check 2020-09-09 19:04:30 +02:00
seq ALSA: seq: oss: Avoid mutex lock for a long-time ioctl 2020-10-29 09:55:11 +01:00
compress_offload.c ALSA: compress: fix partial_drain completion state 2020-07-16 08:17:24 +02:00
control_compat.c
control.c ALSA: ctl: allow TLV read operation for callback type of element in locked case 2020-02-24 08:34:35 +01:00
ctljack.c
device.c
hrtimer.c
hwdep_compat.c
hwdep.c ALSA: hwdep: fix a left shifting 1 by 31 UB bug 2020-06-03 08:19:38 +02:00
info_oss.c
info.c ALSA: info: Drop WARN_ON() from buffer NULL sanity check 2020-07-29 10:16:47 +02:00
init.c
isadma.c
jack.c
Kconfig
Makefile
memalloc.c
memory.c
misc.c
pcm_compat.c
pcm_dmaengine.c
pcm_drm_eld.c
pcm_iec958.c
pcm_lib.c ALSA: pcm: fix incorrect hw_base increase 2020-05-27 17:37:36 +02:00
pcm_local.h
pcm_memory.c
pcm_misc.c
pcm_native.c ALSA: pcm: disallow linking stream to itself 2020-06-22 09:05:03 +02:00
pcm_param_trace.h
pcm_timer.c
pcm_trace.h
pcm.c
rawmidi_compat.c
rawmidi.c ALSA: rawmidi: Fix racy buffer resize under concurrent accesses 2020-05-20 08:18:47 +02:00
seq_device.c
sgbuf.c
sound_oss.c
sound.c
timer_compat.c
timer.c ALSA: timer: Limit max amount of slave instances 2019-12-31 16:35:40 +01:00
vmaster.c