Messages in this thread Patch in this message | | | Date | Sun, 30 Oct 2022 11:48:28 -0400 | From | Steven Rostedt <> | 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@roeck-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;
| |