Re: [PATCH v4 1/3] rust: workqueue: restrict delayed work to global wqs
From: Andreas Hindborg
Date: Mon Mar 16 2026 - 06:58:55 EST
"Alice Ryhl" <aliceryhl@xxxxxxxxxx> writes:
> When a workqueue is shut down, delayed work that is pending but not
> scheduled does not get properly cleaned up, so it's not safe to use
> `enqueue_delayed` on a workqueue that might be destroyed. To fix this,
> restricted `enqueue_delayed` to static queues.
>
> This may be fixed in the future by an approach along the lines of [1].
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 7c098cd5eaae ("workqueue: rust: add delayed work items")
> Reviewed-by: John Hubbard <jhubbard@xxxxxxxxxx>
> Reviewed-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
> Link: https://lore.kernel.org/r/20250423-destroy-workqueue-flush-v1-1-3d74820780a5@xxxxxxxxxx [1]
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Reviewed-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
Best regards,
Andreas Hindborg