[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221028061422.139c54a7@gandalf.local.home>
Date: Fri, 28 Oct 2022 06:14:22 -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
Subject: Re: [RFC][PATCH v2 20/31] timers: usb: Use del_timer_shutdown()
before freeing timer
On Thu, 27 Oct 2022 22:23:06 -0700
Guenter Roeck <linux@...ck-us.net> wrote:
> > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> > index bbab424b0d55..397f263ab7da 100644
> > --- a/drivers/usb/core/hub.c
> > +++ b/drivers/usb/core/hub.c
> > @@ -1261,6 +1261,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
> >
> > /* Don't do a long sleep inside a workqueue routine */
> > if (type == HUB_INIT2) {
> > + /* Timers must be shutdown before they are re-initialized */
> > + if (hub->init_work.work.func)
> > + del_timer_shutdown(&hub->init_work.timer);
> > INIT_DELAYED_WORK(&hub->init_work, hub_init_func3);
>
> A similar call to INIT_DELAYED_WORK() around line 1085 needs the same change.
>
> It would be great if that can somehow be hidden in INIT_DELAYED_WORK().
I agree, but the delayed work is such a special case, I'm struggling to
find something that works sensibly. :-/
-- Steve
Powered by blists - more mailing lists