Message ID | 20221104054916.096085393@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 l7csp190901wru; Thu, 3 Nov 2022 22:51:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5mgKhVSi0G6lhk8Gcir6bDwKVQmgGiO7yiSV+4chfoW7RY8CY4+I0i6Nn9NIiVu8KPGwz9 X-Received: by 2002:a17:906:7843:b0:7ad:e82b:b635 with SMTP id p3-20020a170906784300b007ade82bb635mr20306978ejm.23.1667541084198; Thu, 03 Nov 2022 22:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541084; cv=none; d=google.com; s=arc-20160816; b=FCMFEVZm/PP9C9Cm3X0iPbrzGUf/at6UlgDkH2aDs2dcKWeMGjFcMJs2iEaFxtHBFH LmmRUCn6jpTy3HQreztvdpAvc+iTqZCCXED2XK4CZ7jz0MmUQ6g5FrGnIy2ikVrU2whK h0Bn1eJQpH0CHSlDReNfi4TZ2Qm/rSiubpFgB5faMFn4fYO+BsuGzq26o5gt/wOCTApO OeHyo2/CsOlCj7ox+HfoHzvqbRY+IIVln218+v2IX9ZLxVgbJ8d8j+uuftShK2r5mYes Mespqv65cDUr9AmRIU3viix4bq9D+1Ov7wLMa6Rx6DHgL7WSJh1S4zyT/r46VLXjMK50 PRCQ== 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=m8HNETkpn845osFw8xl708Ndgl2nta7D6wQfim51cak=; b=my5VG+qy2Nb832D75BqyYvt3gY/LcZuWlhT2pdmsEETg4nCs+9q8FIuCK3CMGV9g9q fxTahBcyXgLPia+2MkWxDlFgs8VclRAIQnlzZ5JitonH6j4TRosdgAgJhNBazSL8fB/q Zu6jMJRHkT7mOx99ZAFwAS/9yGeU+31t/M/SeTflDy5oMFJFdO3JX5+BxX0ZdYK1TR3V qyaU2H9ipK0cUdvEQ2+wZe+hp6c6ux4TE1wt0L6eaJuqKrZYgqz7nUyGh0uJ19SOonCa 0w/kAUns1AZhdg/CdbqAFHhVEFwR1GmP8ZDhmXnR9Ff+wddNtOj9Z5XK4KXgcqBvDQNv 8svg== 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 s21-20020a508d15000000b0045cd7614e59si3653614eds.451.2022.11.03.22.50.59; Thu, 03 Nov 2022 22:51:24 -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 S231475AbiKDFuO (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 01:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231343AbiKDFsy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 01:48:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E50E27B2A; 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 CD41F620D3; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9491C4314D; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from <rostedt@goodmis.org>) id 1oqpZs-0071Ai-0q; Fri, 04 Nov 2022 01:49:16 -0400 Message-ID: <20221104054916.096085393@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:16 -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>, Anna-Maria Gleixner <anna-maria@linutronix.de>, Andrew Morton <akpm@linux-foundation.org>, 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 v3 23/33] timers: nfc: pn533: Use timer_shutdown_sync() before freeing timer References: <20221104054053.431922658@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?1748543559939155524?= X-GMAIL-MSGID: =?utf-8?q?1748543559939155524?= |
Series |
timers: Use timer_shutdown*() before freeing timers
|
|
Commit Message
Steven Rostedt
Nov. 4, 2022, 5:41 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org> Before a timer is freed, timer_shutdown_sync() 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(-)
Comments
On 04/11/2022 01:41, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > Before a timer is freed, timer_shutdown_sync() must be called. > > Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ I think link has to be updated. Best regards, Krzysztof
On Fri, 4 Nov 2022 11:46:26 -0400 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > On 04/11/2022 01:41, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > > > Before a timer is freed, timer_shutdown_sync() must be called. > > > > Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ > > I think link has to be updated. Yes, I was lazy on that. My next patch series will point to 00 of this series. Thanks, -- Steve
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c index d9f6367b9993..0a1d0b4e3bb8 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); + timer_shutdown_sync(&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..a556acdb947b 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); + timer_shutdown_sync(&pn532->cmd_timeout); kfree_skb(pn532->recv_skb); kfree(pn532); }