Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2056070rwi; Fri, 28 Oct 2022 02:24:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Lh4d63GgvUnRSG8rUC0GRWTCy4E1VKUTzjkFnqujikebPSv5zVhFUxeReep/y/lXmUAEt X-Received: by 2002:a17:90b:4a84:b0:20d:8953:5ab0 with SMTP id lp4-20020a17090b4a8400b0020d89535ab0mr15508603pjb.48.1666949094065; Fri, 28 Oct 2022 02:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666949094; cv=none; d=google.com; s=arc-20160816; b=BExKYwyUN/E3arPU7o/O/FaI52Ja/OMIUX4Box5g9DbMWV5LAyR3Y+GF8zKhsQpzyQ xfYiM1sCcRpkcw9MKFCewUflSZ65Zb23B2SkPkV7U8Beb3JMSXP6EK0HHnjgSYf+rvAA MKT5oIsYSi6Ly5R1aepxTSLcAUTHk9aneDXy/5iMWUDg9DSo4cQlmkxiqGr6i/uPlTpT mypNHAmn2gnkWEG6idQxpdJ/TotxLhkZHUoFAbWjdsRX09HzUls8SqVsm1Jwqkbo+KIC vRRkm+0xOWBSMzlmFC01zdIyMrKJBENDV9ZdqpqRPIrxEiF0qhZO+3tUPl4vRdLWIqdg jSRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=FGwUHQUQ/OF1EgdhxPURRulnf0czT/1UBQSXD9N1iSY=; b=GWO5kGtaoIfshdQSB9Yiu9KDevaLGVEXEY6baCTPmLOJXnZseRNuVkQkSAG9aF9lYv zGoUQDh5+Woxtc8T++ACaMSwAHQ2cgR3zeDyLkgYvrpfZ5hf2kxyW4LtGGUr37gLQfah yBGVXzvD5HZ4LWhD/a4OxlPkrn9G+DgY7kgitA3iBYPlqrC+bKLEFhXm5ccMenQh2kAR CpqcyHmvT2MHpyAV4uMeNcCl2gfBYFAFdBjdmlQskqy8H797o1B9SY7ky6a65ZXtjNmk GmymeZ3jipyHONIRVXDTVARobqX0aDTAhfZXCQy4LndFnwAKc3SnbaYhtjkr6nm6kwKY 5VSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=G2AwcJg8; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a170902cec200b001865eac3459si5156293plg.460.2022.10.28.02.24.42; Fri, 28 Oct 2022 02:24:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=G2AwcJg8; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbiJ1JRI (ORCPT + 99 others); Fri, 28 Oct 2022 05:17:08 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 >