[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221105135338.14309ea1@rorschach.local.home>
Date: Sat, 5 Nov 2022 13:53:38 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>,
Guenter Roeck <linux@...ck-us.net>,
Anna-Maria Gleixner <anna-maria@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>, rcu@...r.kernel.org,
linux-doc@...r.kernel.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, linux-edac@...r.kernel.org,
cgroups@...r.kernel.org, linux-block@...r.kernel.org,
linux-acpi@...r.kernel.org,
linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org,
linux-pm@...r.kernel.org, drbd-dev@...ts.linbit.com,
linux-bluetooth@...r.kernel.org,
openipmi-developer@...ts.sourceforge.net,
linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linaro-mm-sig@...ts.linaro.org, intel-gfx@...ts.freedesktop.org,
linux-input@...r.kernel.org, linux-parisc@...r.kernel.org,
linux-leds@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
linux-usb@...r.kernel.org, linux-wireless@...r.kernel.org,
linux-scsi@...r.kernel.org, linux-staging@...ts.linux.dev,
linux-ext4@...r.kernel.org, linux-nilfs@...r.kernel.org,
bridge@...ts.linux-foundation.org, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, lvs-devel@...r.kernel.org,
linux-afs@...ts.infradead.org, linux-nfs@...r.kernel.org,
tipc-discussion@...ts.sourceforge.net, alsa-devel@...a-project.org
Subject: Re: [PATCH v4a 00/38] timers: Use timer_shutdown*() before freeing
timers
On Sat, 5 Nov 2022 08:59:36 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> Others in the series were *definitely* not scripted, doing clearly
> manual cleanups:
>
> - if (dch->timer.function) {
> - del_timer(&dch->timer);
> - dch->timer.function = NULL;
> - }
> + timer_shutdown(&dch->timer);
>
> so no, this does *not* make me feel "ok, this is all trivial".
I just ran the script and the above code turned to:
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 4f7eaa17fb27..2695bbde52db 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -4544,7 +4544,7 @@ release_port(struct hfc_multi *hc, struct dchannel *dch)
spin_lock_irqsave(&hc->lock, flags);
if (dch->timer.function) {
- del_timer(&dch->timer);
+ timer_shutdown(&dch->timer);
dch->timer.function = NULL;
}
Which is silly. Because timer_shutdown() makes timer.function = NULL.
That's why I changed it. And it really shouldn't be touching
timer.function anyway.
-- Steve
Powered by blists - more mailing lists