]> git.baikalelectronics.ru Git - kernel.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)
committerTakashi Iwai <tiwai@suse.de>
Fri, 7 Jul 2017 13:34:57 +0000 (15:34 +0200)
commitf90b78af4950f6f6dd29909b17d23c3a18d1bc56
tree3380b79080ccb2942cd976ddb16f54728e6b1b0f
parentcbb2437c3192768e5311c56ee343eded505eb75d
ALSA: msnd: Optimize / harden DSP and MIDI loops

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>
sound/isa/msnd/msnd_midi.c
sound/isa/msnd/msnd_pinnacle.c