From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D670C38A02 for ; Fri, 28 Oct 2022 09:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbiJ1JRJ (ORCPT ); Fri, 28 Oct 2022 05:17:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiJ1JRH (ORCPT ); Fri, 28 Oct 2022 05:17:07 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20F6415A949 for ; Fri, 28 Oct 2022 02:17:06 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C23E51F897; Fri, 28 Oct 2022 09:17:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666948624; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FGwUHQUQ/OF1EgdhxPURRulnf0czT/1UBQSXD9N1iSY=; b=G2AwcJg8CT9dy0Y+MskRX8fgWMMLAWs0rWmMfu+7ViDk+J/JAQajFkdy0fygnD1mFPlqjl W5vwPoRojlQ+9Vpf9QGaOKERNsgVPPa8oB7go5ov6KVaemyrfJaWplRLcfPekN95ac7Qxk vnmSo3nA+mAjwxf7aLxkPe60CiWzGQU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666948624; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FGwUHQUQ/OF1EgdhxPURRulnf0czT/1UBQSXD9N1iSY=; b=3IBGb1Lq1jW+9fzwIqGfcXNmYiMQSPHb/zX/zHXfgThcBACuALPVbg25TEVOrUwI3ZwiO/ t7K3e84NY3Rht6DQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 895DE1377D; Fri, 28 Oct 2022 09:17:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id amfGIBCeW2N+FQAAMHmgww (envelope-from ); Fri, 28 Oct 2022 09:17:04 +0000 Date: Fri, 28 Oct 2022 11:17:04 +0200 Message-ID: <87fsf8mhnz.wl-tiwai@suse.de> From: Takashi Iwai To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Jaroslav Kysela , Takashi Iwai , Austin Kim , alsa-devel@alsa-project.org Subject: Re: [RFC][PATCH v2 29/31] timers: ALSA: Use del_timer_shutdown() before freeing timer In-Reply-To: <20221027150930.702028779@goodmis.org> References: <20221027150525.753064657@goodmis.org> <20221027150930.702028779@goodmis.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Oct 2022 17:05:54 +0200, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > Before a timer is freed, del_timer_shutdown() must be called. > > Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ > > Cc: Jaroslav Kysela > Cc: Takashi Iwai > Cc: Austin Kim > Cc: alsa-devel@alsa-project.org > Signed-off-by: Steven Rostedt (Google) Reviewed-by: Takashi Iwai I think there are a few other codes in sound/* that should use del_timer_shutdown() (although it works practically as is for now). I'll convert them once when the API is included. thanks, Takashi > --- > sound/i2c/other/ak4117.c | 2 +- > sound/synth/emux/emux.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c > index 1bc43e927d82..5269ab7321a4 100644 > --- a/sound/i2c/other/ak4117.c > +++ b/sound/i2c/other/ak4117.c > @@ -47,7 +47,7 @@ static void reg_dump(struct ak4117 *ak4117) > > static void snd_ak4117_free(struct ak4117 *chip) > { > - del_timer_sync(&chip->timer); > + del_timer_shutdown(&chip->timer); > kfree(chip); > } > > diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c > index a870759d179e..a43025f466bb 100644 > --- a/sound/synth/emux/emux.c > +++ b/sound/synth/emux/emux.c > @@ -129,7 +129,7 @@ int snd_emux_free(struct snd_emux *emu) > if (! emu) > return -EINVAL; > > - del_timer_sync(&emu->tlist); > + del_timer_shutdown(&emu->tlist); > > snd_emux_proc_free(emu); > snd_emux_delete_virmidi(emu); > -- > 2.35.1 >