linux/sound/core/seq
Takashi Iwai 4e7655fd4f ALSA: seq: Don't break snd_use_lock_sync() loop by timeout
The snd_use_lock_sync() (thus its implementation
snd_use_lock_sync_helper()) has the 5 seconds timeout to break out of
the sync loop.  It was introduced from the beginning, just to be
"safer", in terms of avoiding the stupid bugs.

However, as Ben Hutchings suggested, this timeout rather introduces a
potential leak or use-after-free that was apparently fixed by the
commit 2d7d54002e ("ALSA: seq: Fix race during FIFO resize"):
for example, snd_seq_fifo_event_in() -> snd_seq_event_dup() ->
copy_from_user() could block for a long time, and snd_use_lock_sync()
goes timeout and still leaves the cell at releasing the pool.

For fixing such a problem, we remove the break by the timeout while
still keeping the warning.

Suggested-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-13 14:13:25 +02:00
..
oss sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
Kconfig
Makefile
seq_clientmgr.c ALSA: seq: Fix racy cell insertions during snd_seq_pool_done() 2017-03-21 14:01:10 +01:00
seq_clientmgr.h
seq_compat.c
seq_device.c
seq_dummy.c
seq_fifo.c ALSA: seq: Fix race during FIFO resize 2017-03-24 17:11:00 +01:00
seq_fifo.h
seq_info.c
seq_info.h
seq_lock.c ALSA: seq: Don't break snd_use_lock_sync() loop by timeout 2017-04-13 14:13:25 +02:00
seq_lock.h
seq_memory.c ALSA: seq: Fix racy cell insertions during snd_seq_pool_done() 2017-03-21 14:01:10 +01:00
seq_memory.h ALSA: seq: Fix racy cell insertions during snd_seq_pool_done() 2017-03-21 14:01:10 +01:00
seq_midi_emul.c
seq_midi_event.c
seq_midi.c
seq_ports.c
seq_ports.h
seq_prioq.c
seq_prioq.h
seq_queue.c ALSA: seq: Fix race at creating a queue 2017-02-08 12:42:37 +01:00
seq_queue.h
seq_system.c
seq_system.h
seq_timer.c
seq_timer.h
seq_virmidi.c
seq.c