From patchwork Fri Nov 4 05:41:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15355 Return-Path: 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 + 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 ); 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 ) 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 To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Krzysztof Kozlowski , "David S. Miller" , Dan Carpenter , Chengfeng Ye , Lin Ma , Duoming Zhou , 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 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?1748543559939155524?= X-GMAIL-MSGID: =?utf-8?q?1748543559939155524?= 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: Krzysztof Kozlowski Cc: "David S. Miller" Cc: Dan Carpenter Cc: Chengfeng Ye Cc: Lin Ma Cc: Duoming Zhou Cc: netdev@vger.kernel.org Signed-off-by: Steven Rostedt (Google) --- 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..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); }