Thread (8 messages) 8 messages, 7 authors, 2023-06-08

Re: [PATCH 1/1] batman-adv: Broken sync while rescheduling delayed work

From: Paolo Abeni <pabeni@redhat.com>
Date: 2023-06-08 09:27:38
Also in: batman

On Wed, 2023-06-07 at 22:01 -0700, Jakub Kicinski wrote:
On Wed,  7 Jun 2023 17:55:15 +0200 Simon Wunderlich wrote:
quoted
The reason for these issues is the lack of synchronization. Delayed
work (batadv_dat_purge) schedules new timer/work while the device
is being deleted. As the result new timer/delayed work is set after
cancel_delayed_work_sync() was called. So after the device is freed
the timer list contains pointer to already freed memory.
I guess this is better than status quo but is the fix really complete?
We're still not preventing the timer / work from getting scheduled
and staying alive after the netdev has been freed, right?
I *think* this specific use case does not expose such problem, as the
delayed work is (AFAICS) scheduled only at device creation time and by
the work itself, it should never be re-scheduled after
cancel_delayed_work_sync()

Cheers,

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help