linux/sound/core/seq
Takashi Iwai 13d5e5d472 ALSA: seq: Fix double port list deletion
The commit [7f0973e973: ALSA: seq: Fix lockdep warnings due to
double mutex locks] split the management of two linked lists (source
and destination) into two individual calls for avoiding the AB/BA
deadlock.  However, this may leave the possible double deletion of one
of two lists when the counterpart is being deleted concurrently.
It ends up with a list corruption, as revealed by syzkaller fuzzer.

This patch fixes it by checking the list emptiness and skipping the
deletion and the following process.

BugLink: http://lkml.kernel.org/r/CACT4Y+bay9qsrz6dQu31EcGaH9XwfW7o3oBzSQUG9fMszoh=Sg@mail.gmail.com
Fixes: 7f0973e973 ('ALSA: seq: Fix lockdep warnings due to 'double mutex locks)
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-16 14:37:19 +01:00
..
oss ALSA: seq: Degrade the error message for too many opens 2016-01-25 11:52:23 +01:00
Kconfig
Makefile
seq_clientmgr.c ALSA: seq: Fix lockdep warnings due to double mutex locks 2016-02-03 14:51:51 +01:00
seq_clientmgr.h
seq_compat.c ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode 2016-01-18 14:39:13 +01:00
seq_device.c
seq_dummy.c
seq_fifo.c
seq_fifo.h
seq_info.c
seq_info.h
seq_lock.c
seq_lock.h
seq_memory.c ALSA: seq: Fix leak of pool buffer at concurrent writes 2016-02-15 16:26:52 +01:00
seq_memory.h
seq_midi_emul.c
seq_midi_event.c
seq_midi.c
seq_ports.c ALSA: seq: Fix double port list deletion 2016-02-16 14:37:19 +01:00
seq_ports.h
seq_prioq.c
seq_prioq.h
seq_queue.c ALSA: seq: Fix race at timer setup and close 2016-01-12 17:50:41 +01:00
seq_queue.h
seq_system.c
seq_system.h
seq_timer.c ALSA: seq: Fix yet another races among ALSA timer accesses 2016-02-01 12:23:29 +01:00
seq_timer.h
seq_virmidi.c ALSA: rawmidi: Make snd_rawmidi_transmit() race-free 2016-02-03 14:51:28 +01:00
seq.c