]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: hdsp: Break infinite MIDI input flush loop
authorTakashi Iwai <tiwai@suse.de>
Thu, 8 Aug 2024 09:15:12 +0000 (11:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:28 +0000 (15:11 +0200)
commit6c4194f385cea9d30fe5cf840d53c0fe1ae19905
tree0aed2d51035a54188a1cb7baeaa299d27a2fd577
parent36ee4021bcc37b834996e79740d095d6f8dd948f
ALSA: hdsp: Break infinite MIDI input flush loop

[ Upstream commit c01f3815453e2d5f699ccd8c8c1f93a5b8669e59 ]

The current MIDI input flush on HDSP and HDSPM drivers relies on the
hardware reporting the right value.  If the hardware doesn't give the
proper value but returns -1, it may be stuck at an infinite loop.

Add a counter and break if the loop is unexpectedly too long.

Link: https://patch.msgid.link/20240808091513.31380-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/hdspm.c