ALSA: pcmtest: stop timer before buffer is released
authorIvan Orlov <ivan.orlov0322@gmail.com>
Wed, 6 Dec 2023 22:32:11 +0000 (22:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:51:42 +0000 (11:51 +0100)
commit3f7109ec1fa540288f760d89d9baf2795bcb2614
treed0a7c1fc3ca6a544925b122b67b64f238903c649
parentb92ad44a1b32356d4713da79348db7a3f78f4beb
ALSA: pcmtest: stop timer before buffer is released

[ Upstream commit eb99b1b72a424a79f56c972e0fd7ad01fe93a008 ]

Stop timer in the 'trigger' and 'sync_stop' callbacks since we want
the timer to be stopped before the DMA buffer is released. Otherwise,
it could trigger a kernel panic in some circumstances, for instance
when the DMA buffer is already released but the timer callback is
still running.

Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20231206223211.12761-1-ivan.orlov0322@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/drivers/pcmtest.c