From patchwork Fri Nov 4 05:41:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15357 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp190942wru; Thu, 3 Nov 2022 22:51:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7NTSjKRHuTxyzgCE7iAufmvdW1g6L0vnlJJdpp2iHJWCBVK2ZBqk45WLXWZBiAtqy5bdSt X-Received: by 2002:a17:906:3287:b0:78d:8877:d50f with SMTP id 7-20020a170906328700b0078d8877d50fmr33196283ejw.486.1667541092952; Thu, 03 Nov 2022 22:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541092; cv=none; d=google.com; s=arc-20160816; b=1AQcs32rKvZvyKvHYvMIr6tb8o3x0edLGTg2/DT+P9AtwWE6zFeA8Xc5np+oloRu6e tdMMyatjSrq+0+GO4YhesB5H/r6SFyG6YVwp030rO7G1IdU/gccaXRe9+/3Nz3FAh7SR 27Hx3X7k2cW12mxJ7x6Gk/J86Ud3BbIHrCGPb9OY6RkLr6Q/KtqQ0FEexBp2lkKzJlII ShHlr2ofsW48oAxS3xiJrueLQl5drZ4zD4BA5JqeDElcSqty8tdngENZt+/+JETrpc+N e9IZQCXUw6GkoZzN7XJoroh8695C+CSoN0voS/NhvSVnzfo7f9fTTYSexClz9TAxXxhb NXBg== 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=YmQyhj+owAAshOXGnJaRE/T83XR6a7WIToFwZzMQbbw=; b=Hrlt8yPIgcD4CVdz51AyNGLhwRbk8jjQTkiS0iJN/0u1xsskS7CUMvPxBiQYyOyUjn z8YEMX28Rkw+tcjYUjtbb3f0qBd2YhkXv2TVAWstZmXXryIM37inmW6fHCC2TUdpSbNA LbPwIC3dfqyCZ7U9cYwUEEcZNZi0Jdpylrs//6x3MaMen6FyjeiztJ2o4yEuP16vJd8N Kh1wT3BvackR1MiuIzDpRgqCr3Ig+6TIzQxgenTvUt7lc6/zwQsxG23b1jGU9PFlxRFt y0NvOI3V14pIQDPCA5fIc70iQi71V9NTWNEMs8brmBI1fr0sSdJtaLi/7t9RStPfXVm6 40OA== 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 o3-20020aa7c503000000b004549b880c67si3043407edq.42.2022.11.03.22.51.09; Thu, 03 Nov 2022 22:51:32 -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 S231766AbiKDFua (ORCPT + 99 others); Fri, 4 Nov 2022 01:50:30 -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 S231349AbiKDFsy (ORCPT ); Fri, 4 Nov 2022 01:48:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EF6D28E06 for ; Thu, 3 Nov 2022 22:48:52 -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 0CE71620D5 for ; Fri, 4 Nov 2022 05:48:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D89B8C4314F; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oqpZs-0071BH-1R; Fri, 04 Nov 2022 01:49:16 -0400 Message-ID: <20221104054916.279744019@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:17 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Minghao Chi , Tony Lindgren , Arnd Bergmann , Cai Huoqing , "Paul E. McKenney" , Dominik Brodowski Subject: [RFC][PATCH v3 24/33] timers: pcmcia: 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?1748543569154961955?= X-GMAIL-MSGID: =?utf-8?q?1748543569154961955?= 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: Minghao Chi Cc: Tony Lindgren Cc: Arnd Bergmann Cc: "Souptick Joarder Cc: Cai Huoqing Cc: "Paul E. McKenney" Acked-by: Dominik Brodowski 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..dd3c26099048 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); + timer_shutdown_sync(&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..efc27bc15152 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); + timer_shutdown_sync(&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..e613818dc0bc 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); + timer_shutdown_sync(&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..a0a2e7f18356 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); + timer_shutdown_sync(&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); + timer_shutdown_sync(&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..1365eaa20ff4 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); + timer_shutdown_sync(&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); + timer_shutdown_sync(&socket->poll_timer); unmap: iounmap(socket->base); yenta_free_resources(socket);