]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: msnd: Optimize / harden DSP and MIDI loops
authorTakashi Iwai <tiwai@suse.de>
Thu, 6 Jul 2017 10:34:40 +0000 (12:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2017 21:03:47 +0000 (14:03 -0700)
commitbceac1033cd99ff5d2aaa69c700367f866bf6f04
tree45c57d7d94260a5270280f34007e31bef661d247
parent8e7e643a6c6d565568a1634c61572d8f96e7f030
ALSA: msnd: Optimize / harden DSP and MIDI loops

commit 20e2b791796bd68816fa115f12be5320de2b8021 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: Takashi Iwai <tiwai@suse.de>
Signed-off-by: grygorii tertychnyi <gtertych@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/isa/msnd/msnd_midi.c
sound/isa/msnd/msnd_pinnacle.c