From patchwork Thu Oct 27 15:05:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp287531wru; Thu, 27 Oct 2022 08:12:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+M05Xpc1pBBpF6VvbdnzshjxOT2b0anaXV8V1eFN7A3n+tjKO6FaE+Sbq/HC7pMNgR0of X-Received: by 2002:a17:907:1ddd:b0:7ad:8371:b59c with SMTP id og29-20020a1709071ddd00b007ad8371b59cmr6484442ejc.429.1666883550512; Thu, 27 Oct 2022 08:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666883550; cv=none; d=google.com; s=arc-20160816; b=XvwQxu8pbv2ChtyzNFm86zWKzGyshzt6E98g0hHRdLdFd19fuDBnR+kHZp0Oaec5Jk j4gneukuOBstI8ytoWPa71Smve9BN6E2UXzwc/bWmjywsXk7nhdmuegQj7aT13FnVoAF pL/XzA1DsUtK6t25Scfk6NyIH2PDeHufme+3nLcONXwgWW3TukmTSFOJa/sTrS2q2b1F KssZ10fxBawyzvELOlm6W7pUwWUzugWe/TW4GgAKAzCAzM1IoDSlhF4mENnCMCBURJYU qia+VKJAA/uP/n31eKVkWVFVM0kmlXhp9HQmWhQp9deoGnOw8ufm2sQmGB/cMf7Gu3Ba 2ZYg== 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=HpXPPwRIe1ojYt0JdPs6C/GAXYJXj1ZQK/zWSpL8lv8=; b=tSqreP1o42BGTLgTGzC7ff/lt7HNmeszY9dXPHDo7XfSnLuO/onfojfmEtraJILYvo ao8azn+VLTHEMdbf1NL4e4Yz1QE1qjxPLqU+G1dhuhm3TOnKGyIyuqDkUUucNA84Eu8X Ye38sqPNo1YcnDeMaTV6b9Zk+IhNjwubGP5OCYyVVdHfQlyw80j2gZ36aJeCoeAPdQKP fpGS0BgKNs8JyfgUV7itzYb4pwLxZXFTz8c5lIvIpdkvhMWi+UPSNFm+aproUN2RVycj /fq5ENYBi448fJZ7Giw3ldbr6BiNUN0VdDfvJMn3ZyfQ0QVd5KcRwWvut9OZ5welKghO qkVQ== 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 h1-20020a056402280100b00461eff7bb0csi2248591ede.31.2022.10.27.08.12.05; Thu, 27 Oct 2022 08:12:30 -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 S236176AbiJ0PLH (ORCPT + 99 others); Thu, 27 Oct 2022 11:11:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236093AbiJ0PJS (ORCPT ); Thu, 27 Oct 2022 11:09:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86C2A18F936 for ; Thu, 27 Oct 2022 08:09:15 -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 48BC8623B1 for ; Thu, 27 Oct 2022 15:09:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7914C43141; Thu, 27 Oct 2022 15:09:14 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oo4Vd-00Bvf2-2y; Thu, 27 Oct 2022 11:09:29 -0400 Message-ID: <20221027150929.749620335@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 27 Oct 2022 11:05:49 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Dominik Brodowski , Minghao Chi , Tony Lindgren , Arnd Bergmann , Cai Huoqing , "Paul E. McKenney" Subject: [RFC][PATCH v2 24/31] timers: pcmcia: Use del_timer_shutdown() before freeing timer References: <20221027150525.753064657@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?1747854085719250086?= X-GMAIL-MSGID: =?utf-8?q?1747854085719250086?= 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: Dominik Brodowski Cc: Minghao Chi Cc: Tony Lindgren Cc: Arnd Bergmann Cc: "Souptick Joarder Cc: Cai Huoqing Cc: "Paul E. McKenney" Signed-off-by: Steven Rostedt (Google) --- drivers/pcmcia/bcm63xx_pcmcia.c | 2 +- drivers/pcmcia/electra_cf.c | 2 +- drivers/pcmcia/omap_cf.c | 2 +- drivers/pcmcia/pd6729.c | 4 ++-- drivers/pcmcia/yenta_socket.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c index bb06311d0b5f..1e96fa905bb0 100644 --- a/drivers/pcmcia/bcm63xx_pcmcia.c +++ b/drivers/pcmcia/bcm63xx_pcmcia.c @@ -443,7 +443,7 @@ static int bcm63xx_drv_pcmcia_remove(struct platform_device *pdev) struct resource *res; skt = platform_get_drvdata(pdev); - del_timer_sync(&skt->timer); + del_timer_shutdown(&skt->timer); iounmap(skt->base); iounmap(skt->io_base); res = skt->reg_res; diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 40a5cffe24a4..3c9a77a4c5d5 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c @@ -317,7 +317,7 @@ static int electra_cf_remove(struct platform_device *ofdev) cf->active = 0; pcmcia_unregister_socket(&cf->socket); free_irq(cf->irq, cf); - del_timer_sync(&cf->timer); + del_timer_shutdown(&cf->timer); iounmap(cf->io_virt); iounmap(cf->mem_base); diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index d3f827d4224a..f4c0ea073f14 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -296,7 +296,7 @@ static int __exit omap_cf_remove(struct platform_device *pdev) cf->active = 0; pcmcia_unregister_socket(&cf->socket); - del_timer_sync(&cf->timer); + del_timer_shutdown(&cf->timer); release_mem_region(cf->phys_cf, SZ_8K); free_irq(cf->irq, cf); kfree(cf); diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index f0af9985ca09..539aeca0501c 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c @@ -727,7 +727,7 @@ static int pd6729_pci_probe(struct pci_dev *dev, if (irq_mode == 1) free_irq(dev->irq, socket); else - del_timer_sync(&socket->poll_timer); + del_timer_shutdown(&socket->poll_timer); err_out_free_res: pci_release_regions(dev); err_out_disable: @@ -754,7 +754,7 @@ static void pd6729_pci_remove(struct pci_dev *dev) if (irq_mode == 1) free_irq(dev->irq, socket); else - del_timer_sync(&socket->poll_timer); + del_timer_shutdown(&socket->poll_timer); pci_release_regions(dev); pci_disable_device(dev); diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 3966a6ceb1ac..8bceaf30d094 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c @@ -814,7 +814,7 @@ static void yenta_close(struct pci_dev *dev) if (sock->cb_irq) free_irq(sock->cb_irq, sock); else - del_timer_sync(&sock->poll_timer); + del_timer_shutdown(&sock->poll_timer); iounmap(sock->base); yenta_free_resources(sock); @@ -1285,7 +1285,7 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id) if (socket->cb_irq) free_irq(socket->cb_irq, socket); else - del_timer_sync(&socket->poll_timer); + del_timer_shutdown(&socket->poll_timer); unmap: iounmap(socket->base); yenta_free_resources(socket);