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: [PATCH v4a 19/38] timers: nfc: pn533: Use timer_shutdown_sync() before freeing timer
Date: Sat, 05 Nov 2022 02:00:43 -0400 [thread overview]
Message-ID: <20221105060158.322031906@goodmis.org> (raw)
In-Reply-To: 20221105060024.598488967@goodmis.org
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Before a timer is freed, timer_shutdown_sync() must be called.
Link: https://lore.kernel.org/all/20221104054053.431922658@goodmis.org/
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..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);
}
--
2.35.1
next prev parent reply other threads:[~2022-11-05 6:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 6:00 [PATCH v4a 00/38] timers: Use timer_shutdown*() before freeing timers Steven Rostedt
2022-11-05 6:00 ` [PATCH v4a 01/38] SUNRPC/xprt: Use del_timer_sync() instead of del_singleshot_timer_sync() Steven Rostedt
2022-11-05 6:00 ` [PATCH v4a 09/38] timers: atm: Use timer_shutdown_sync() before freeing timer Steven Rostedt
2022-11-05 6:00 ` [PATCH v4a 14/38] timers: mISDN: " Steven Rostedt
2022-11-05 6:00 ` Steven Rostedt [this message]
2022-11-07 10:13 ` [PATCH v4a 19/38] timers: nfc: pn533: " Krzysztof Kozlowski
2022-11-05 6:00 ` [PATCH v4a 34/38] timers: atm: Use timer_shutdown_sync() before a module is released Steven Rostedt
2022-11-05 14:18 ` [PATCH v4a 00/38] timers: Use timer_shutdown*() before freeing timers Guenter Roeck
2022-11-05 14:47 ` Steven Rostedt
2022-11-05 15:59 ` Linus Torvalds
2022-11-05 16:36 ` Steven Rostedt
2022-11-05 16:53 ` Steven Rostedt
2022-11-05 18:03 ` Steven Rostedt
2022-11-05 18:05 ` Steven Rostedt
2022-11-05 18:28 ` Linus Torvalds
2022-11-05 21:03 ` Jason A. Donenfeld
2022-11-05 21:13 ` Linus Torvalds
2022-11-05 21:45 ` Steven Rostedt
2022-11-05 21:47 ` Steven Rostedt
2022-11-05 17:53 ` Steven Rostedt
2022-11-05 19:31 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221105060158.322031906@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=anna-maria@linutronix.de \
--cc=cyeaa@connect.ust.hk \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=duoming@zju.edu.cn \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=netdev@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).