[PATCH 3/3] ALSA: dummy: Properly shutdown the systimer at freeing

From: Takashi Iwai

Date: Mon Jul 20 2026 - 09:58:20 EST


Add timer_shutdown_sync() call at the free callback for systimer
backend, in order to make sure that we can release the resources.

This is only for hardening, and there shouldn't be any actual issue
that requires this change for now.

Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
sound/drivers/dummy.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 3bc0289e3518..8836799727ea 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -350,7 +350,10 @@ static int dummy_systimer_create(struct snd_pcm_substream *substream)

static void dummy_systimer_free(struct snd_pcm_substream *substream)
{
- kfree(substream->runtime->private_data);
+ struct dummy_systimer_pcm *dpcm = substream->runtime->private_data;
+
+ timer_shutdown_sync(&dpcm->timer);
+ kfree(dpcm);
}

static const struct dummy_timer_ops dummy_systimer_ops = {
--
2.55.0