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>
Thu, 18 Nov 2021 18:15:55 +0000 (19:15 +0100)
commitd90b9f87968a61113795cbaddec3a969c5dde0e6
tree374003ffbbf3a10a9046b65b68a8dae00ba8e08a
parente1bcad600319d88e53bbea13bcea92dba102c769
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