From nobody Sat Jul 25 02:35:07 2026 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EB183F54C8 for ; Mon, 20 Jul 2026 13:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784555651; cv=none; b=aDFvOJdbLI+ZHKLJ+29wz4HO/8fW2UFXON63eZ/NKkFbfZcF2w6nEp5NdshvyGCA1GzGrDffqNyy4YVqjxECMhgKq0BPMwhmXe65gs7LdykzpKjhsjo4LY9Bw37poTCWQtDk9AybCcOPwraKT2tm4e/j1+OUV8ziw+YiiMC22iY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784555651; c=relaxed/simple; bh=BnPHvbdLR+KK/clJ6eTNjKjFOiu/0M9EJtxFUfESucs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lNwiXRQcw19zUbn5qVxEkg0wSjJOQzlv3dQqRsf4L1wsiNjPPcu3DSbOmRISuhJWzk5EIHdaKinxYbmjwmPtvbpxfHnSvqF8p1SsGq3obMsopms51iV01dCXWui/F+m1Wqxzrenx3+m8IVkDYBzkyXjSUAQ5zo9RcA6FUxZFdvc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=sUrerCgw; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=U8ri74AN; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=sUrerCgw; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=U8ri74AN; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="sUrerCgw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="U8ri74AN"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="sUrerCgw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="U8ri74AN" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E290579FA8; Mon, 20 Jul 2026 13:54:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1784555641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oT6wM0Z5RqQGdb//l1PG30oj+xsYg7TUcqiShGqM594=; b=sUrerCgwjS8csW0wuRJt99xKeqG9pzri8K6YYBKbMo45wsnpAawgwnyhqLvIOTSH3zLFzR pRTP+FDN3iBJo/QxMtEWT6g6tzhn8dc73hJN+TE/pe1iRmEy+Pah+Dt8ch0hV8AUDg5Flf R7PA2sjJqsRtnQAcjG2wjZ1Tv4jkxbg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1784555641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oT6wM0Z5RqQGdb//l1PG30oj+xsYg7TUcqiShGqM594=; b=U8ri74ANTsniqYI74AwQBGvjO6ZoxHcRF6PzZiamD00nF8qOS2kGrIE89aWSUFr3okUR80 imGzgeAdDINTVSCw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1784555641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oT6wM0Z5RqQGdb//l1PG30oj+xsYg7TUcqiShGqM594=; b=sUrerCgwjS8csW0wuRJt99xKeqG9pzri8K6YYBKbMo45wsnpAawgwnyhqLvIOTSH3zLFzR pRTP+FDN3iBJo/QxMtEWT6g6tzhn8dc73hJN+TE/pe1iRmEy+Pah+Dt8ch0hV8AUDg5Flf R7PA2sjJqsRtnQAcjG2wjZ1Tv4jkxbg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1784555641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oT6wM0Z5RqQGdb//l1PG30oj+xsYg7TUcqiShGqM594=; b=U8ri74ANTsniqYI74AwQBGvjO6ZoxHcRF6PzZiamD00nF8qOS2kGrIE89aWSUFr3okUR80 imGzgeAdDINTVSCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C39DB779AB; Mon, 20 Jul 2026 13:54:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8PSHLnkoXmr8KgAAD6G6ig (envelope-from ); Mon, 20 Jul 2026 13:54:01 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ALSA: dummy: Use the standard PCM sync_stop callback for hrtimer Date: Mon, 20 Jul 2026 15:53:52 +0200 Message-ID: <20260720135356.1779857-2-tiwai@suse.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260720135356.1779857-1-tiwai@suse.de> References: <20260720135356.1779857-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.996]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: Content-Type: text/plain; charset="utf-8" The hrtimer backend code in ALSA dummy driver calls explicitly the synchronization of hrtimer cancel from prepare and free callbacks, and this is exactly what the standard PCM sync_stop callback serves for. Replace the open-code with the standard PCM sync_stop callback. Signed-off-by: Takashi Iwai --- sound/drivers/dummy.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 7283f0f18813..ddd4da058693 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -100,6 +100,7 @@ struct dummy_timer_ops { int (*prepare)(struct snd_pcm_substream *); int (*start)(struct snd_pcm_substream *); int (*stop)(struct snd_pcm_substream *); + int (*sync_stop)(struct snd_pcm_substream *); snd_pcm_uframes_t (*pointer)(struct snd_pcm_substream *); }; =20 @@ -407,9 +408,12 @@ static int dummy_hrtimer_stop(struct snd_pcm_substream= *substream) return 0; } =20 -static inline void dummy_hrtimer_sync(struct dummy_hrtimer_pcm *dpcm) +static int dummy_hrtimer_sync_stop(struct snd_pcm_substream *substream) { + struct dummy_hrtimer_pcm *dpcm =3D substream->runtime->private_data; + hrtimer_cancel(&dpcm->timer); + return 0; } =20 static snd_pcm_uframes_t @@ -435,7 +439,6 @@ static int dummy_hrtimer_prepare(struct snd_pcm_substre= am *substream) long sec; unsigned long nsecs; =20 - dummy_hrtimer_sync(dpcm); period =3D runtime->period_size; rate =3D runtime->rate; sec =3D period / rate; @@ -463,7 +466,7 @@ static int dummy_hrtimer_create(struct snd_pcm_substrea= m *substream) static void dummy_hrtimer_free(struct snd_pcm_substream *substream) { struct dummy_hrtimer_pcm *dpcm =3D substream->runtime->private_data; - dummy_hrtimer_sync(dpcm); + kfree(dpcm); } =20 @@ -473,6 +476,7 @@ static const struct dummy_timer_ops dummy_hrtimer_ops = =3D { .prepare =3D dummy_hrtimer_prepare, .start =3D dummy_hrtimer_start, .stop =3D dummy_hrtimer_stop, + .sync_stop =3D dummy_hrtimer_sync_stop, .pointer =3D dummy_hrtimer_pointer, }; =20 @@ -495,6 +499,13 @@ static int dummy_pcm_trigger(struct snd_pcm_substream = *substream, int cmd) return -EINVAL; } =20 +static int dummy_pcm_sync_stop(struct snd_pcm_substream *substream) +{ + if (get_dummy_ops(substream)->sync_stop) + return get_dummy_ops(substream)->sync_stop(substream); + return 0; +} + static int dummy_pcm_prepare(struct snd_pcm_substream *substream) { return get_dummy_ops(substream)->prepare(substream); @@ -646,6 +657,7 @@ static const struct snd_pcm_ops dummy_pcm_ops =3D { .hw_params =3D dummy_pcm_hw_params, .prepare =3D dummy_pcm_prepare, .trigger =3D dummy_pcm_trigger, + .sync_stop =3D dummy_pcm_sync_stop, .pointer =3D dummy_pcm_pointer, }; =20 @@ -655,6 +667,7 @@ static const struct snd_pcm_ops dummy_pcm_ops_no_buf = =3D { .hw_params =3D dummy_pcm_hw_params, .prepare =3D dummy_pcm_prepare, .trigger =3D dummy_pcm_trigger, + .sync_stop =3D dummy_pcm_sync_stop, .pointer =3D dummy_pcm_pointer, .copy =3D dummy_pcm_copy, .fill_silence =3D dummy_pcm_silence, --=20 2.55.0 From nobody Sat Jul 25 02:35:07 2026 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 721D242A7AC for ; Mon, 20 Jul 2026 13:54:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784555657; cv=none; b=ivzMAEzpfx3re3+6zz8ZtsPeBF9rHSjB0FnTfRBsI742hxqL01DlwjmNAWzW61+R9xnfPGzNPqFIocEZtp09Quo4qROgyb41PN2m6WYB3+uVrooa38Hwr7+jDB+QaCmoZBtlxc5TrFJyg6R+zSYm/8Ob+VLrjNFCEoMFHlUznKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784555657; c=relaxed/simple; bh=e0aSv+9JnyYvKEk+xoJb7PTEJeDYhakF2wCfud0spzo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fCjwckwo8R9y4ga1qnf1ynLEQrSvsWRO79S0H0WGl3DoGRA8rSDjh6djtIU5/uXRMW3JtHr225HRzTfMlGkqMrEw0qAkd75308YYsrC5OC4k+vhBOECiNQttFcBy9dG/p7pOdF+6+obK70mYBa/LauSM310CrLsp8kDusDgt4Ak= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=iIwTkBSl; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=js+z9I/o; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=iIwTkBSl; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=js+z9I/o; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="iIwTkBSl"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="js+z9I/o"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="iIwTkBSl"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="js+z9I/o" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 13E4A79FA9; Mon, 20 Jul 2026 13:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1784555642; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uPgCshBj2V6WI6FFQ3vk3tVARqmn3O7GTHYH4EVXB38=; b=iIwTkBSl71MYOOgqBXkhLqeD8i2kEVypzRhjdRB868XpSZlw0zcCX1VgDbs23MnCCjgnlm 5Z19JxRRiu8PNVY/di19tBCsktsCQwgCI9Skb0PUyrF0yEFcEhX/4KAv9VnIUnT5N4PQnl vo8l0aDczCpt6459OGmbzGyAeAy7Lec= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1784555642; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uPgCshBj2V6WI6FFQ3vk3tVARqmn3O7GTHYH4EVXB38=; b=js+z9I/oBTXa8Z0uZ4qrCNPhmmiBsbbiajWGxZ4vfuBtqxRf2fS1tR4WTs7o1/my9OUh/5 3Mfpe8qY65Xr/dBw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1784555642; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uPgCshBj2V6WI6FFQ3vk3tVARqmn3O7GTHYH4EVXB38=; b=iIwTkBSl71MYOOgqBXkhLqeD8i2kEVypzRhjdRB868XpSZlw0zcCX1VgDbs23MnCCjgnlm 5Z19JxRRiu8PNVY/di19tBCsktsCQwgCI9Skb0PUyrF0yEFcEhX/4KAv9VnIUnT5N4PQnl vo8l0aDczCpt6459OGmbzGyAeAy7Lec= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1784555642; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uPgCshBj2V6WI6FFQ3vk3tVARqmn3O7GTHYH4EVXB38=; b=js+z9I/oBTXa8Z0uZ4qrCNPhmmiBsbbiajWGxZ4vfuBtqxRf2fS1tR4WTs7o1/my9OUh/5 3Mfpe8qY65Xr/dBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E98BE779AA; Mon, 20 Jul 2026 13:54:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qCuzN3koXmr8KgAAD6G6ig (envelope-from ); Mon, 20 Jul 2026 13:54:01 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/3] ALSA: dummy: Implement sync_stop for systimer, too Date: Mon, 20 Jul 2026 15:53:53 +0200 Message-ID: <20260720135356.1779857-3-tiwai@suse.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260720135356.1779857-1-tiwai@suse.de> References: <20260720135356.1779857-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Flag: NO X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.996]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Spam-Score: -2.80 Content-Type: text/plain; charset="utf-8" The systimer backend invokes timer_delete() at stopping the PCM, but it misses its synchronization, which might lead to concurrent changes or releases at PCM prepare or free. Use the sync_stop callback to assure the synchronization of timer deletion. Signed-off-by: Takashi Iwai --- sound/drivers/dummy.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index ddd4da058693..3bc0289e3518 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -286,6 +286,14 @@ static int dummy_systimer_stop(struct snd_pcm_substrea= m *substream) return 0; } =20 +static int dummy_systimer_sync_stop(struct snd_pcm_substream *substream) +{ + struct dummy_systimer_pcm *dpcm =3D substream->runtime->private_data; + + timer_delete_sync(&dpcm->timer); + return 0; +} + static int dummy_systimer_prepare(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime =3D substream->runtime; @@ -351,6 +359,7 @@ static const struct dummy_timer_ops dummy_systimer_ops = =3D { .prepare =3D dummy_systimer_prepare, .start =3D dummy_systimer_start, .stop =3D dummy_systimer_stop, + .sync_stop =3D dummy_systimer_sync_stop, .pointer =3D dummy_systimer_pointer, }; =20 --=20 2.55.0 From nobody Sat Jul 25 02:35:07 2026 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 440C83B4E94 for ; Mon, 20 Jul 2026 13:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784555645; cv=none; b=ZGjV7LIzjT8UYTppTBIUiP2ZPJlrrEBB90++qRb0QXX6z/6mv0MhubhYWVZ0T480rzdzVPq+jBD9bKyyLnbNDFyJw6RK3iN1GE5eQqCiUkms2qO+/GrmoSLNerFpnjGqSF4du8XBe9Tf1GDE3N+5om4fbNmbr5j6pLzU1+6IJjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784555645; c=relaxed/simple; bh=Ez+9SZ8SsIunUaA7/ptekPRo2yryDLxgTJDT2NeH8iE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IqwF2vhLWSJF3ZaPMq05wDKRpx1M2W8lT5NVjeOHBngzg0N/PvESIJq/fiZsS112Ze6aFN3/wBeqy4anJGxMLgYrcu7h7aYkMk0laNcdnzRenpHfTGOqxKfFC2b90riMcjUFg8Uj3U0WPf6zPxdPl+f4vjRGtWJNFzvPaTrZjh8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=G4F1LqXY; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=7NFd2E5i; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=G4F1LqXY; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=7NFd2E5i; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="G4F1LqXY"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="7NFd2E5i"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="G4F1LqXY"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="7NFd2E5i" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4270D3E09; Mon, 20 Jul 2026 13:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1784555642; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=duh6GR//6DC3VwxZcKT/INpqt6rZqENnAv9GftJzZK8=; b=G4F1LqXYDL1S6JAnvZfZz9D7onVHbPtnJxrZnwYdvQGjcJybPIGbKhaNkhCRyEq2T/TjYw lb0TaMGLRd5Z0tadd0bnv4+ttThHkBHSPFuucgI+WCsjk9xrMoUkUNqYAzBMeSNLJiGs3x PKoT9Argrmwj76PswB9WWRP2k4Ni9C8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1784555642; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=duh6GR//6DC3VwxZcKT/INpqt6rZqENnAv9GftJzZK8=; b=7NFd2E5itv0WbxeL3u2u+eYU16kK129GMmYJmuPVrbbbPR3ZmQba/e7qxzKz62JhcWT9fa /n0Ck1zdSeN0H6AQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1784555642; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=duh6GR//6DC3VwxZcKT/INpqt6rZqENnAv9GftJzZK8=; b=G4F1LqXYDL1S6JAnvZfZz9D7onVHbPtnJxrZnwYdvQGjcJybPIGbKhaNkhCRyEq2T/TjYw lb0TaMGLRd5Z0tadd0bnv4+ttThHkBHSPFuucgI+WCsjk9xrMoUkUNqYAzBMeSNLJiGs3x PKoT9Argrmwj76PswB9WWRP2k4Ni9C8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1784555642; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=duh6GR//6DC3VwxZcKT/INpqt6rZqENnAv9GftJzZK8=; b=7NFd2E5itv0WbxeL3u2u+eYU16kK129GMmYJmuPVrbbbPR3ZmQba/e7qxzKz62JhcWT9fa /n0Ck1zdSeN0H6AQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1B233779AB; Mon, 20 Jul 2026 13:54:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id IJxSBXooXmr8KgAAD6G6ig (envelope-from ); Mon, 20 Jul 2026 13:54:02 +0000 From: Takashi Iwai To: linux-sound@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/3] ALSA: dummy: Properly shutdown the systimer at freeing Date: Mon, 20 Jul 2026 15:53:54 +0200 Message-ID: <20260720135356.1779857-4-tiwai@suse.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260720135356.1779857-1-tiwai@suse.de> References: <20260720135356.1779857-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.996]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: Content-Type: text/plain; charset="utf-8" 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 --- 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_substr= eam *substream) =20 static void dummy_systimer_free(struct snd_pcm_substream *substream) { - kfree(substream->runtime->private_data); + struct dummy_systimer_pcm *dpcm =3D substream->runtime->private_data; + + timer_shutdown_sync(&dpcm->timer); + kfree(dpcm); } =20 static const struct dummy_timer_ops dummy_systimer_ops =3D { --=20 2.55.0