ALSA: timer: Unconditionally unlink slave instances, too
authorTakashi Iwai <tiwai@suse.de>
Fri, 5 Nov 2021 09:15:17 +0000 (10:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:40:21 +0000 (11:40 +0100)
commit4b53cce322dd4920470f539abf21550564f0b9f7
tree17370569c3b4c5941098d820311c3a6cab27b78a
parent1cc5dd50af8d1b3260cd0011946c0db5e96ab696
ALSA: timer: Unconditionally unlink slave instances, too

commit ffdd98277f0a1d15a67a74ae09bee713df4c0dbc upstream.

Like the previous fix (commit c0317c0e8709 "ALSA: timer: Fix
use-after-free problem"), we have to unlink slave timer instances
immediately at snd_timer_stop(), too.  Otherwise it may leave a stale
entry in the list if the slave instance is freed before actually
running.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211105091517.21733-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/timer.c