Re: [PATCH] workqueue: rust: add creation of workqueues
From: Alice Ryhl
Date: Tue Apr 15 2025 - 05:01:49 EST
On Mon, Apr 14, 2025 at 08:15:41PM +0200, Danilo Krummrich wrote:
> On Fri, Apr 11, 2025 at 03:34:24PM +0000, Alice Ryhl wrote:
> >
> > +/// An owned kernel work queue.
>
> I'd suggest to document that dropping an OwnedQueue will wait for pending work.
>
> Additionally, given that you're about to implement delayed work as well, we
> should also mention that destroy_workqueue() currently does not cover waiting
> for delayed work *before* it is scheduled and hence may cause WARN() splats or
> even UAF bugs.
Ah, that's a problem :(
Can we make destroy_workqueue() wait for delayed items too? And/or have
a variant of it that does so? I'm not sure what is best to do here...
Alice