mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
On module unload/remove, we need to ensure that work does not run
after we have freed resources. Concretely, cancel_delayed_work()
may return while the callback function is still running.
From kernel/workqueue.c:
The work callback function may still be running on return,
unless it returns true and the work doesn't re-arm itself.
Explicitly flush or use cancel_delayed_work_sync() to wait on it.
Link: https://lore.kernel.org/lkml/[email protected]/
Reported-by: Sven Van Asbroeck <[email protected]>
Reviewed-by: Dmitry Torokhov <[email protected]>
Reviewed-by: Sven Van Asbroeck <[email protected]>
Acked-by: Robin van der Gracht <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>