From patchwork Fri Nov 4 05:40:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15341 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp190272wru; Thu, 3 Nov 2022 22:49:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5E448DYnufR8geE1UeEV1TvtwY1911p6sTMXuxafqJfnpAMaJqDAKq0wLjjTUA+1vKkLUf X-Received: by 2002:a05:6402:2550:b0:462:38d7:a6e1 with SMTP id l16-20020a056402255000b0046238d7a6e1mr34719866edb.337.1667540968715; Thu, 03 Nov 2022 22:49:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667540968; cv=none; d=google.com; s=arc-20160816; b=RuiIJdXusjEByclBiawcBAqnpzn7vVSlahZCWIKB+iJndPsjftajJ0lFeMOum60fNp cBsNqCpiL8j+VhVeMc5Jc0AX8qpiw8ub1k3c7Gsey0Ov/5WtXKtgHbhpRgIk/Kf8uwts J7lxNdIH7bjYb0T52ddC64K8xKC3b36zj+j0PJbof/7FQvuJajI7+4u66aDq5fDLJODd CitrSUnqLkydkPiwupUWuUliCnbPFgddG/CdJlKZS5yF9bRVkDlmu4qPMspa2Ska0CyL zpIkfqVMOzSZFrPrTTAU54M2fDXgUvwnQNwdjNviqUob4U6YIioyRVD7LHOiDtOdxf83 50HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=5X+ELetg5hrG4mqIze0Q9uNIA1ykHHASDtNfcL7Fod8=; b=Va1g7cG7GRkA3+JNKEc/iKjMddn2xRjciY4yozAxbV5O7CiCKTUV9MfCT5Jd7OV8zM j6O4R/CPC9PalEijmwD/zeBv1gQ40wDst+RFhAHX3D0Afe1S2x9pF4WEV5ouGOwY5IGB Z5CMlZ5rnvO+8qRYEAM9T+ZOwx3NsfN0nI4LsaPuC02DgQkn3Zmh99sKwXjRUbIGnDXK j/9IYFoC+/UHU8+9CVNAAg5Hl04Ghv8ue+iuRhoq+OXvIR018XhgXvBRAotUa2xwb8Yi axWoTvxNSn9FHDGc8dD1bvLtvwvTkltXCxJPwKGt7uxWzktuSl76VgRxK5Ef8tS2oocv 8OVQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a056402104d00b00461865aae72si3329286edu.219.2022.11.03.22.49.05; Thu, 03 Nov 2022 22:49:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231404AbiKDFs5 (ORCPT + 99 others); Fri, 4 Nov 2022 01:48:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231217AbiKDFsu (ORCPT ); Fri, 4 Nov 2022 01:48:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3A3B28E0D; Thu, 3 Nov 2022 22:48:47 -0700 (PDT) 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 43EC2620BA; Fri, 4 Nov 2022 05:48:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0A69C433D7; Fri, 4 Nov 2022 05:48:46 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oqpZp-007117-0U; Fri, 04 Nov 2022 01:49:13 -0400 Message-ID: <20221104054912.988821248@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:40:59 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Chas Williams <3chas3@gmail.com>, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org Subject: [RFC][PATCH v3 06/33] timers: atm: Use timer_shutdown_sync() before freeing timer References: <20221104054053.431922658@goodmis.org> MIME-Version: 1.0 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748543438642721642?= X-GMAIL-MSGID: =?utf-8?q?1748543438642721642?= From: "Steven Rostedt (Google)" Before a timer is freed, timer_shutdown_sync() must be called. Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ Cc: Chas Williams <3chas3@gmail.com> Cc: linux-atm-general@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Steven Rostedt (Google) --- drivers/atm/idt77105.c | 4 ++-- drivers/atm/idt77252.c | 4 ++-- drivers/atm/iphase.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c index bfca7b8a6f31..cc4a5449ca42 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c @@ -366,8 +366,8 @@ EXPORT_SYMBOL(idt77105_init); static void __exit idt77105_exit(void) { /* turn off timers */ - del_timer_sync(&stats_timer); - del_timer_sync(&restart_timer); + timer_shutdown_sync(&stats_timer); + timer_shutdown_sync(&restart_timer); } module_exit(idt77105_exit); diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index 681cb3786794..99cae174d558 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c @@ -2213,7 +2213,7 @@ idt77252_init_ubr(struct idt77252_dev *card, struct vc_map *vc, } spin_unlock_irqrestore(&vc->lock, flags); if (est) { - del_timer_sync(&est->timer); + timer_shutdown_sync(&est->timer); kfree(est); } @@ -3752,7 +3752,7 @@ static void __exit idt77252_exit(void) card = idt77252_chain; dev = card->atmdev; idt77252_chain = card->next; - del_timer_sync(&card->tst_timer); + timer_shutdown_sync(&card->tst_timer); if (dev->phy->stop) dev->phy->stop(dev); diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 324148686953..9be45d9d66b3 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -3280,7 +3280,7 @@ static void __exit ia_module_exit(void) { pci_unregister_driver(&ia_driver); - del_timer_sync(&ia_timer); + timer_shutdown_sync(&ia_timer); } module_init(ia_module_init);