Re: [PATCH] Bluetooth: hci_qca: Use del_timer_sync() before freeing

From: Eric Dumazet
Date: Wed Apr 06 2022 - 18:29:31 EST



On 4/6/22 09:46, Steven Rostedt wrote:
On Wed, 6 Apr 2022 09:36:10 -0700
Guenter Roeck <linux@xxxxxxxxxxxx> wrote:

So we have a chicken verses egg issue here?
Almost looks like it, unless I am missing something. Maybe some flag
is needed to prevent the timer handling code from queuing into the
destroyed workqueue, or the workqueue handler from updating the timer.
That's exactly what I was thinking. I do not know all the code here. I
could try to write a patch, but I may likely miss something.

-- Steve


Take a look at

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=1946014ca3b19be9e485e780e862c375c6f98bad


Ie, use an ->live  (or ->dead) field.