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>,
"Andy Walls" <awalls@md.metrocast.net>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Mike Isely" <isely@pobox.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Johan Hovold" <johan@kernel.org>,
"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"Corey Minyard" <cminyard@mvista.com>,
"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev
Subject: [PATCH v4a 16/38] timers: media: Use timer_shutdown_sync() before freeing timer
Date: Sat, 05 Nov 2022 02:00:40 -0400 [thread overview]
Message-ID: <20221105060157.784143184@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: Andy Walls <awalls@md.metrocast.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Mike Isely <isely@pobox.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Johan Hovold <johan@kernel.org>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Cc: Corey Minyard <cminyard@mvista.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-media@vger.kernel.org
Cc: linux-staging@lists.linux.dev
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
drivers/media/pci/ivtv/ivtv-driver.c | 2 +-
drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 16 ++++++++--------
drivers/media/usb/s2255/s2255drv.c | 4 ++--
.../staging/media/atomisp/i2c/atomisp-lm3554.c | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c
index f5846c22c799..ba503d820e48 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.c
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
@@ -1425,7 +1425,7 @@ static void ivtv_remove(struct pci_dev *pdev)
/* Interrupts */
ivtv_set_irq_mask(itv, 0xffffffff);
- del_timer_sync(&itv->dma_timer);
+ timer_shutdown_sync(&itv->dma_timer);
/* Kill irq worker */
kthread_flush_worker(&itv->irq_worker);
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
index 62ff1fa1c753..75c89b07e86a 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
@@ -2605,10 +2605,10 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
return hdw;
fail:
if (hdw) {
- del_timer_sync(&hdw->quiescent_timer);
- del_timer_sync(&hdw->decoder_stabilization_timer);
- del_timer_sync(&hdw->encoder_run_timer);
- del_timer_sync(&hdw->encoder_wait_timer);
+ timer_shutdown_sync(&hdw->quiescent_timer);
+ timer_shutdown_sync(&hdw->decoder_stabilization_timer);
+ timer_shutdown_sync(&hdw->encoder_run_timer);
+ timer_shutdown_sync(&hdw->encoder_wait_timer);
flush_work(&hdw->workpoll);
v4l2_device_unregister(&hdw->v4l2_dev);
usb_free_urb(hdw->ctl_read_urb);
@@ -2668,10 +2668,10 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw)
if (!hdw) return;
pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw);
flush_work(&hdw->workpoll);
- del_timer_sync(&hdw->quiescent_timer);
- del_timer_sync(&hdw->decoder_stabilization_timer);
- del_timer_sync(&hdw->encoder_run_timer);
- del_timer_sync(&hdw->encoder_wait_timer);
+ timer_shutdown_sync(&hdw->quiescent_timer);
+ timer_shutdown_sync(&hdw->decoder_stabilization_timer);
+ timer_shutdown_sync(&hdw->encoder_run_timer);
+ timer_shutdown_sync(&hdw->encoder_wait_timer);
if (hdw->fw_buffer) {
kfree(hdw->fw_buffer);
hdw->fw_buffer = NULL;
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index acf18e2251a5..3c2627712fe9 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -1487,7 +1487,7 @@ static void s2255_destroy(struct s2255_dev *dev)
/* board shutdown stops the read pipe if it is running */
s2255_board_shutdown(dev);
/* make sure firmware still not trying to load */
- del_timer_sync(&dev->timer); /* only started in .probe and .open */
+ timer_shutdown_sync(&dev->timer); /* only started in .probe and .open */
if (dev->fw_data->fw_urb) {
usb_kill_urb(dev->fw_data->fw_urb);
usb_free_urb(dev->fw_data->fw_urb);
@@ -2322,7 +2322,7 @@ static int s2255_probe(struct usb_interface *interface,
errorFWDATA2:
usb_free_urb(dev->fw_data->fw_urb);
errorFWURB:
- del_timer_sync(&dev->timer);
+ timer_shutdown_sync(&dev->timer);
errorEP:
usb_put_dev(dev->udev);
errorUDEV:
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
index 75d16b525294..c4ce4cd445d7 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
@@ -921,7 +921,7 @@ static void lm3554_remove(struct i2c_client *client)
atomisp_gmin_remove_subdev(sd);
- del_timer_sync(&flash->flash_off_delay);
+ timer_shutdown_sync(&flash->flash_off_delay);
lm3554_gpio_uninit(client);
--
2.35.1
next prev parent reply other threads:[~2022-11-05 6:01 UTC|newest]
Thread overview: 17+ 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 ` Steven Rostedt [this message]
2022-11-05 6:00 ` [PATCH v4a 32/38] timers: media: Use timer_shutdown_sync() for on stack timers 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=20221105060157.784143184@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=anna-maria@linutronix.de \
--cc=awalls@md.metrocast.net \
--cc=benjamin.mugnier@foss.st.com \
--cc=cminyard@mvista.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=isely@pobox.com \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux@roeck-us.net \
--cc=mchehab@kernel.org \
--cc=ojeda@kernel.org \
--cc=olteanv@gmail.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sboyd@kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=u.kleine-koenig@pengutronix.de \
/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).