From patchwork Thu Oct 27 15:05:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 13022292 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4AA3AFA3741 for ; Thu, 27 Oct 2022 15:10:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6F5E12FB6; Thu, 27 Oct 2022 17:09:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6F5E12FB6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1666883415; bh=9OhRiUCkD0dEfvVlkwWG20B6/jErcKAbr+bW0OxHlyk=; h=Date:From:To:Subject:References:Cc:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=lxNzeABzVap9+6y7Zc8f7uMMfKu2uFKUjZ6QCObeHYkn1huo6LbvVxWXGS7VCyb36 0/uFvn/cQQNUlQ833caZBPcjMSZdXCa2GTLPkV618Ud5spSPicCXb5NvPhYFtrUdik ZJGjvKHUt5jI8OsBdOTwucB22742AG7BiwYt3RvE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0CD0AF8016C; Thu, 27 Oct 2022 17:09:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B242AF8025A; Thu, 27 Oct 2022 17:09:23 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0728EF80100 for ; Thu, 27 Oct 2022 17:09:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0728EF80100 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C1A1E623BC; Thu, 27 Oct 2022 15:09:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E617C433D7; Thu, 27 Oct 2022 15:09:15 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oo4Ve-00Bvhr-2p; Thu, 27 Oct 2022 11:09:30 -0400 Message-ID: <20221027150930.702028779@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 27 Oct 2022 11:05:54 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Subject: [RFC][PATCH v2 29/31] timers: ALSA: Use del_timer_shutdown() before freeing timer References: <20221027150525.753064657@goodmis.org> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Stephen Boyd , Takashi Iwai , Austin Kim , Thomas Gleixner , Linus Torvalds , Guenter Roeck X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 --- 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);