ALSA: msnd: Optimize / harden DSP and MIDI loops
Takashi Iwai authored
commit 20e2b791 upstream.

The ISA msnd drivers have loops fetching the ring-buffer head, tail
and size values inside the loops.  Such codes are inefficient and
fragile.

This patch optimizes it, and also adds the sanity check to avoid the
endless loops.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196131
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196133

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatargrygorii tertychnyi <gtertych@cisco.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
03bea515
Name Last commit Last update
..
aoa Merge tag 'powerpc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
arm ALSA: arm: Fix empty menuconfig SND_ARM
atmel ALSA: sound/atmel/ac97c.c: remove unused variable
core ALSA: core: Fix unexpected error at replacing user TLV
drivers ALSA: dummy: Fix a use-after-free at closing
firewire ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource
hda ALSA: hda: Fix cpu lockup when stopping the cmd dmas
i2c ALSA: ak4114: remove redundant check on err being < 0
isa ALSA: msnd: Optimize / harden DSP and MIDI loops
mips ALSA: Remove deprecated AU1X00 AC97 driver
oss sound: oss: Use kernel_read_file_from_path() for mod_firmware_load()
parisc ALSA: Include linux/io.h instead of asm/io.h
pci ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978)
pcmcia ALSA: vx: Fix missing kerneldoc parameter descriptions
ppc Merge tag 'powerpc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
sh ALSA: sh: aica: Remove deprecated create_workqueue
soc ASoC: rt5645: set sel_i2s_pre_div1 to 2
sparc dbri: move dereference after check for NULL
spi ALSA: at73c213: manage SSC clock
synth ALSA: emux: constify nrpn_conv_table structures
usb ALSA: usb-audio: Add delay quirk for H650e/Jabra 550a USB headsets
Kconfig ALSA: hda - Make snd_hda_bus_type public
Makefile sound: oss: Use kernel_read_file_from_path() for mod_firmware_load()
ac97_bus.c Merge tag 'asoc-v4.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
last.c ALSA: Remove the last mention of SNDRV_MAIN_OBJECT_FILE
sound_core.c sound: fix check for error condition of register_chrdev()