Message ID | 20221027150929.558084770@goodmis.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp287357wru; Thu, 27 Oct 2022 08:12:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4z/GSZxCAnQO6ohIAl6lK16VnC8UyLaEJSztf6UDh0nU6UvlVNOa0zm7IqmqCxRmaPKF6G X-Received: by 2002:a17:906:5d0c:b0:7a5:ad82:f319 with SMTP id g12-20020a1709065d0c00b007a5ad82f319mr21019365ejt.318.1666883534419; Thu, 27 Oct 2022 08:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666883534; cv=none; d=google.com; s=arc-20160816; b=tgvVMyPr9blH/moPuhW4tz7LGi9en0AiDM7aJiBaOhDiDN9XQcVS48FFjZPy+vfL1y eRWSDhladDNYIl5xJwZsJXafgEXjVb7kxivWEMInT9ix3cF0sAvRBk1f+ry6LqldZKtr OPEMLJ9Gll61ttJhP3KrcQWVCF7kwr5JMZWzCEg8ruVcdLG7zl+axcWYJ01eyCMg2b/k +uvaIRnKo5acLctF7VuiNbZu/uRgfi7cBdHaf3U956OmPJATINfTbYIT2ASqaXO7pHjz kS6kEZsV4udmWyFWcmrGfZaVyzXq4yQyRcDwzFeJ0GxPrRWHNvvAN9hZHbsyT3b7AQLG 7N+w== 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=2Pi5z+SAZUlwWP1lW4UaefzEyKERlKuZL1W71h4uA/Q=; b=toEUZLt/Ymp6F+1LLEF6WsXcXkVydzIga6g63DPPN/VGZtlQgbjtmFDVh2Ig6xRgkz 8u8gdiCBTHVf4V+mh1ApARLGGMMJQj/qi2n4z8+dk4LX6xKchIiw3675Z8oAvA2r32Lj EhV4jj+pQaKPSxtbMHtPa9xrXfMq1v+CTM1TscRz9ugChMiM56IV6VwJKI2+NEfVdgFO m2znZKrrZn2YftsYIrwT3agfYSVYj/zwJQ/LuPqmoQw8OA+AaLphlv8z2Pu2W0Kk/nSu tO2wMqsPr9XkvChDxsZXx/B27EMXaCRZNn5sDQ9NpKacvqX3dCacy5EQ32V4x5XzeYus Q/SQ== 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 lf20-20020a170906ae5400b0078054af5eeasi1324554ejb.374.2022.10.27.08.11.50; Thu, 27 Oct 2022 08:12:14 -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 S236166AbiJ0PKz (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Thu, 27 Oct 2022 11:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236085AbiJ0PJS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); 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 1EB1B18F243; 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 AB4D8623B8; Thu, 27 Oct 2022 15:09:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 831DFC43470; Thu, 27 Oct 2022 15:09:14 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from <rostedt@goodmis.org>) id 1oo4Vd-00BveT-2M; Thu, 27 Oct 2022 11:09:29 -0400 Message-ID: <20221027150929.558084770@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 27 Oct 2022 11:05:48 -0400 From: Steven Rostedt <rostedt@goodmis.org> To: linux-kernel@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Stephen Boyd <sboyd@kernel.org>, Guenter Roeck <linux@roeck-us.net>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, "David S. Miller" <davem@davemloft.net>, Dan Carpenter <dan.carpenter@oracle.com>, Chengfeng Ye <cyeaa@connect.ust.hk>, Lin Ma <linma@zju.edu.cn>, Duoming Zhou <duoming@zju.edu.cn>, netdev@vger.kernel.org Subject: [RFC][PATCH v2 23/31] timers: nfc: pn533: Use del_timer_shutdown() before freeing timer References: <20221027150525.753064657@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747854068935957089?= X-GMAIL-MSGID: =?utf-8?q?1747854068935957089?= |
Series |
timers: Use del_timer_shutdown() before freeing timers
|
|
Commit Message
Steven Rostedt
Oct. 27, 2022, 3:05 p.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org> Before a timer is freed, del_timer_shutdown() must be called. Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Chengfeng Ye <cyeaa@connect.ust.hk> Cc: Lin Ma <linma@zju.edu.cn> Cc: Duoming Zhou <duoming@zju.edu.cn> Cc: netdev@vger.kernel.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> --- drivers/nfc/pn533/pn533.c | 2 +- drivers/nfc/pn533/uart.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c index d9f6367b9993..e882191649cd 100644 --- a/drivers/nfc/pn533/pn533.c +++ b/drivers/nfc/pn533/pn533.c @@ -2788,7 +2788,7 @@ void pn53x_common_clean(struct pn533 *priv) struct pn533_cmd *cmd, *n; /* delete the timer before cleanup the worker */ - del_timer_sync(&priv->listen_timer); + del_timer_shutdown(&priv->listen_timer); flush_delayed_work(&priv->poll_work); destroy_workqueue(priv->wq); diff --git a/drivers/nfc/pn533/uart.c b/drivers/nfc/pn533/uart.c index 07596bf5f7d6..a40676422237 100644 --- a/drivers/nfc/pn533/uart.c +++ b/drivers/nfc/pn533/uart.c @@ -310,7 +310,7 @@ static void pn532_uart_remove(struct serdev_device *serdev) pn53x_unregister_nfc(pn532->priv); serdev_device_close(serdev); pn53x_common_clean(pn532->priv); - del_timer_sync(&pn532->cmd_timeout); + del_timer_shutdown(&pn532->cmd_timeout); kfree_skb(pn532->recv_skb); kfree(pn532); }