Re: [syzbot] WARNING in call_timer_fn

From: Luiz Augusto von Dentz
Date: Thu Nov 17 2022 - 16:06:25 EST


Hi Thomas,

On Thu, Nov 17, 2022 at 8:06 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> On Thu, Nov 17 2022 at 20:55, Hillf Danton wrote:
> > On 17 Nov 2022 12:54:28 +0100 Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> >>
> >> The work has been canceled already before in the same function and there
> >> are some more delayed works which can trigger this.
> >>
> >> So no, this whole close_sync() function is prone to teardown races and
> >> just slapping a single cancel here without deeper analysis does not cut
> >> it.
> >
> > Agree.
> >
> > A set of sync cancelations can do the job, given what is defined in struct
> > hci_dev wrt workqueue.
>
> It's only part of the solution because you also have to prevent that
> work is queued from other parts of the code....

I thought we would have something similar to shutdown_timer (e.g.
shutdown_delayed_work) so we can safely free its object/struct, at
least that was the impression I got when discussing with Steven.

--
Luiz Augusto von Dentz