android_kernel_oneplus_msm8998/sound
Takashi Iwai abc81720ea ALSA: info: Fix racy addition/deletion of nodes
commit 8c2f870890fd28e023b0fcf49dcee333f2c8bad7 upstream.

The ALSA proc helper manages the child nodes in a linked list, but its
addition and deletion is done without any lock.  This leads to a
corruption if they are operated concurrently.  Usually this isn't a
problem because the proc entries are added sequentially in the driver
probe procedure itself.  But the card registrations are done often
asynchronously, and the crash could be actually reproduced with
syzkaller.

This patch papers over it by protecting the link addition and deletion
with the parent's mutex.  There is "access" mutex that is used for the
file access, and this can be reused for this purpose as well.

Reported-by: syzbot+48df349490c36f9f54ab@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-27 09:34:02 +02:00
..
aoa ALSA: snd-aoa: add of_node_put() in error path 2018-10-10 08:52:05 +02:00
arm ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm 2015-09-30 23:21:16 +01:00
atmel ALSA: sound/atmel/ac97c.c: remove unused variable 2015-05-20 06:18:25 +02:00
core ALSA: info: Fix racy addition/deletion of nodes 2019-04-27 09:34:02 +02:00
drivers ALSA: opl3: fix mismatch between snd_opl3_drum_switch definition and declaration 2019-04-27 09:33:57 +02:00
firewire ALSA: bebob: use more identical mod_alias for Saffire Pro 10 I/O against Liquid Saffire 56 2019-03-23 08:44:31 +01:00
hda sound: enable interrupt after dma buffer initialization 2018-10-20 09:52:33 +02:00
i2c ALSA: ak4xxx-adda: Drop unnecessary ifdef CONFIG_PROC_FS 2015-05-29 07:51:23 +02:00
isa ALSA: sb8: add a check for request_region 2019-04-27 09:33:56 +02:00
mips ALSA: mips: let SND_SGI_O2 select SND_PCM 2015-06-15 13:21:58 +02:00
oss sound: oss/sb_audio: use swap() in sb_audio_close() 2015-06-12 20:46:29 +02:00
parisc
pci ALSA: echoaudio: add a check for ioremap_nocache 2019-04-27 09:33:56 +02:00
pcmcia ALSA: vxpocket: Fix invalid endian conversions 2018-08-22 07:48:36 +02:00
ppc ALSA: ppc/awacs: shut up maybe-uninitialized warning 2017-05-08 07:46:01 +02:00
sh
soc ASoC: fsl_esai: fix channel swap issue when stream starts 2019-04-27 09:33:55 +02:00
sparc ALSA: sparc: Fix invalid snd_free_pages() at error path 2018-12-13 09:21:27 +01:00
spi
synth ALSA: emux: Fix potential Spectre v1 vulnerabilities 2019-01-13 10:05:29 +01:00
usb ALSA: usb-audio: Fix implicit fb endpoint setup by quirk 2019-02-20 10:13:22 +01:00
ac97_bus.c ASoC: Updates for v4.3 2015-08-31 16:25:22 +02:00
Kconfig ALSA: hda - Make snd_hda_bus_type public 2015-03-23 13:15:51 +01:00
last.c
Makefile ALSA: hda - Make snd_hda_bus_type public 2015-03-23 13:15:51 +01:00
sound_core.c sound: fix check for error condition of register_chrdev() 2015-11-07 11:14:30 +01:00
sound_firmware.c sound: sound_firmware: Fix invalid use of vfs_read() 2015-05-26 13:48:58 +02:00