public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@kernel.org>, Johan Hovold <johan@kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Kai-Heng Feng <kai.heng.feng@canonical.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	Bhuvanesh Surachari <Bhuvanesh_Surachari@mentor.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	linux-usb@vger.kernel.org
Subject: [RFC][PATCH v3 20/33] timers: usb: Use timer_shutdown_sync() before freeing timer
Date: Fri, 04 Nov 2022 01:41:13 -0400	[thread overview]
Message-ID: <20221104054915.557680781@goodmis.org> (raw)
In-Reply-To: 20221104054053.431922658@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/20220407161745.7d6754b3@gandalf.local.home/

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Johan Hovold <johan@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: Matthias Kaehlcke <mka@chromium.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Bhuvanesh Surachari <Bhuvanesh_Surachari@mentor.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 drivers/usb/gadget/udc/m66592-udc.c | 2 +-
 drivers/usb/serial/garmin_gps.c     | 2 +-
 drivers/usb/serial/mos7840.c        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c
index 931e6362a13d..c7e421b449f3 100644
--- a/drivers/usb/gadget/udc/m66592-udc.c
+++ b/drivers/usb/gadget/udc/m66592-udc.c
@@ -1519,7 +1519,7 @@ static int m66592_remove(struct platform_device *pdev)
 
 	usb_del_gadget_udc(&m66592->gadget);
 
-	del_timer_sync(&m66592->timer);
+	timer_shutdown_sync(&m66592->timer);
 	iounmap(m66592->reg);
 	free_irq(platform_get_irq(pdev, 0), m66592);
 	m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index f1a8d8343623..670e942fdaaa 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -1405,7 +1405,7 @@ static void garmin_port_remove(struct usb_serial_port *port)
 
 	usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
 	usb_kill_urb(port->interrupt_in_urb);
-	del_timer_sync(&garmin_data_p->timer);
+	timer_shutdown_sync(&garmin_data_p->timer);
 	kfree(garmin_data_p);
 }
 
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 6b12bb4648b8..8a2d902a1c12 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -1726,7 +1726,7 @@ static void mos7840_port_remove(struct usb_serial_port *port)
 		mos7840_set_led_sync(port, MODEM_CONTROL_REGISTER, 0x0300);
 
 		del_timer_sync(&mos7840_port->led_timer1);
-		del_timer_sync(&mos7840_port->led_timer2);
+		timer_shutdown_sync(&mos7840_port->led_timer2);
 
 		usb_kill_urb(mos7840_port->led_urb);
 		usb_free_urb(mos7840_port->led_urb);
-- 
2.35.1

  parent reply	other threads:[~2022-11-04  5:51 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  5:40 [RFC][PATCH v3 00/33] timers: Use timer_shutdown*() before freeing timers Steven Rostedt
2022-11-04  5:40 ` [RFC][PATCH v3 01/33] timers: Add timer_shutdown_sync() and timer_shutdown() to be called " Steven Rostedt
2022-11-04  5:40 ` [RFC][PATCH v3 02/33] timers: s390/cmm: Use timer_shutdown_sync() before freeing timer Steven Rostedt
2022-11-04  5:40 ` [RFC][PATCH v3 03/33] timers: sh: " Steven Rostedt
2022-11-04  5:40 ` [RFC][PATCH v3 05/33] timers: ACPI: " Steven Rostedt
2022-11-07 15:47   ` Jarkko Sakkinen
2022-11-04  5:40 ` [RFC][PATCH v3 06/33] timers: atm: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 07/33] timers: PM: Use timer_shutdown_sync() Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 08/33] timers: Bluetooth: Use timer_shutdown_sync() before freeing timer Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 09/33] timers: hangcheck: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 10/33] timers: ipmi: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 11/33] random: use " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 14/33] timers: HID: Use " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 16/33] timers: mISDN: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 17/33] timers: leds: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 19/33] timers: net: " Steven Rostedt
2022-11-04  5:41 ` Steven Rostedt [this message]
2022-11-04  5:41 ` [RFC][PATCH v3 21/33] timers: cgroup: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 22/33] timers: workqueue: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 23/33] timers: nfc: pn533: " Steven Rostedt
2022-11-04 15:46   ` Krzysztof Kozlowski
2022-11-05  5:25     ` Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 24/33] timers: pcmcia: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 25/33] timers: scsi: Use timer_shutdown_sync() and timer_shutdown() " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 26/33] timers: tty: Use timer_shutdown_sync() " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 27/33] timers: ext4: " Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 28/33] timers: fs/nilfs2: " Steven Rostedt
2022-11-04  6:57   ` Ryusuke Konishi
2022-11-04 18:54     ` Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 29/33] timers: ALSA: " Steven Rostedt
2022-11-04  8:11   ` Takashi Iwai
2022-11-04  5:41 ` [RFC][PATCH v3 30/33] timers: jbd2: Use timer_shutdown() " Steven Rostedt
2022-11-07 12:37   ` Jan Kara
2022-11-04  5:41 ` [RFC][PATCH v3 31/33] timers: sched/psi: Use timer_shutdown_sync() " Steven Rostedt
2022-11-04 20:11   ` Johannes Weiner
2022-11-04 20:29     ` Suren Baghdasaryan
2022-11-04  5:41 ` [RFC][PATCH v3 32/33] timers: x86/mce: Use __init_timer() for resetting timers Steven Rostedt
2022-11-04  5:41 ` [RFC][PATCH v3 33/33] timers: Expand DEBUG_OBJECTS_TIMER to check if it ever was used Steven Rostedt
     [not found] ` <20221104054914.085569465@goodmis.org>
2022-11-04  5:54   ` [RFC][PATCH v3 12/33] timers: dma-buf: Use timer_shutdown_sync() before freeing timer Steven Rostedt
2022-11-04  7:15     ` Christian König
2022-11-04 18:58       ` Steven Rostedt
2022-11-05  8:12         ` [Linaro-mm-sig] " Christian König
     [not found] ` <20221104054914.271196777@goodmis.org>
2022-11-04  5:55   ` [RFC][PATCH v3 13/33] timers: drm: " Steven Rostedt
2022-11-04  8:48   ` Tvrtko Ursulin
2022-11-04 19:02     ` Steven Rostedt
     [not found] ` <20221104054912.617055044@goodmis.org>
2022-11-04  5:56   ` [RFC][PATCH v3 04/33] timers: block: " Steven Rostedt
     [not found] ` <20221104054915.190085802@goodmis.org>
2022-11-04  5:57   ` [RFC][PATCH v3 18/33] timers: media: " Steven Rostedt
2022-11-04 17:00 ` [RFC][PATCH v3 00/33] timers: Use timer_shutdown*() before freeing timers Linus Torvalds
2022-11-04 19:22 ` Guenter Roeck
2022-11-04 19:42   ` Steven Rostedt
2022-11-04 19:50     ` Linus Torvalds
2022-11-04 20:38     ` Steven Rostedt
2022-11-04 20:42       ` Guenter Roeck
2022-11-04 20:41     ` Guenter Roeck
2022-11-04 23:34 ` 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=20221104054915.557680781@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=Bhuvanesh_Surachari@mentor.com \
    --cc=akpm@linux-foundation.org \
    --cc=anna-maria@linutronix.de \
    --cc=balbi@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=m.grzeschik@pengutronix.de \
    --cc=mathias.nyman@linux.intel.com \
    --cc=mka@chromium.org \
    --cc=sboyd@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --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