android_kernel_samsung_univ.../sound
Takashi Iwai a40efb8550 ALSA: seq: Fix double port list deletion
commit 13d5e5d4725c64ec06040d636832e78453f477b7 upstream.

The commit [7f0973e973cd: 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: 7f0973e973cd ('ALSA: seq: Fix lockdep warnings due to 'double mutex locks)
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 12:01:14 -08:00
..
aoa
arm ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm 2015-09-30 23:21:16 +01:00
atmel
core ALSA: seq: Fix double port list deletion 2016-02-25 12:01:14 -08:00
drivers ALSA: dummy: Implement timer backend switching more safely 2016-02-17 12:31:00 -08:00
firewire ALSA: bebob: Use a signed return type for get_formation_index 2016-02-17 12:30:58 -08:00
hda ALSA: hda - Add / fix kernel doc comments 2015-10-28 12:37:29 +01:00
i2c
isa ALSA: Add missing dependency on CONFIG_SND_TIMER 2016-02-17 12:30:58 -08:00
mips
oss
parisc
pci ALSA: hda - Cancel probe work instead of flush at remove 2016-02-25 12:01:13 -08:00
pcmcia
ppc ALSA: ppc: Add missing inclusion of linux/module.h 2015-08-25 14:13:36 +02:00
sh
soc ASoC: rt5645: fix the shift bit of IN1 boost 2016-02-17 12:31:00 -08:00
sparc ALSA: Add missing dependency on CONFIG_SND_TIMER 2016-02-17 12:30:58 -08:00
spi
synth ALSA: synth: Fix conflicting OSS device registration on AWE32 2015-10-05 16:55:09 +02:00
usb ALSA: usb-audio: avoid freeing umidi object twice 2016-02-17 12:30:58 -08:00
ac97_bus.c ASoC: Updates for v4.3 2015-08-31 16:25:22 +02:00
Kconfig
last.c
Makefile
sound_core.c sound: fix check for error condition of register_chrdev() 2015-11-07 11:14:30 +01:00
sound_firmware.c