[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221030114828.58fdd5d0@gandalf.local.home>
Date: Sun, 30 Oct 2022 11:48:28 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Felipe Balbi <balbi@...nel.org>,
Johan Hovold <johan@...nel.org>,
Alan Stern <stern@...land.harvard.edu>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Kai-Heng Feng <kai.heng.feng@...onical.com>,
Matthias Kaehlcke <mka@...omium.org>,
Michael Grzeschik <m.grzeschik@...gutronix.de>,
Bhuvanesh Surachari <Bhuvanesh_Surachari@...tor.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
linux-usb@...r.kernel.org, Tejun Heo <tj@...nel.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
John Stultz <jstultz@...gle.com>
Subject: Re: [RFC][PATCH v2 20/31] timers: usb: Use del_timer_shutdown()
before freeing timer
On Sat, 29 Oct 2022 15:56:25 -0700
Guenter Roeck <linux@...ck-us.net> wrote:
> >> WARNING: CPU: 0 PID: 9 at lib/debugobjects.c:502 debug_print_object+0xd0/0x100
> >> ODEBUG: free active (active state 0) object type: timer_list hint: neigh_timer_handler+0x0/0x480
> >>
> >> That happens with almost every test, so I may have missed some others
> >> in the noise.
> >
> > Can you add this?
> >
>
> It doesn't make a difference.
Ah, it also requires this (I have other debugging in that file, so it may
only apply with some fuzzing):
-- Steve
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index ac2e8beb4235..f2ccf24a8448 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1282,6 +1296,11 @@ int __del_timer(struct timer_list *timer, bool free)
debug_timer_deactivate(timer, true);
}
raw_spin_unlock_irqrestore(&base->lock, flags);
+ } else if (free) {
+ base = lock_timer_base(timer, &flags);
+ timer->function = NULL;
+ debug_timer_deactivate(timer, true);
+ raw_spin_unlock_irqrestore(&base->lock, flags);
}
return ret;
Powered by blists - more mailing lists