Re: [PATCH 6/7] rust: workqueue: add Work::cancel_work_sync()

John Hubbard <[email protected]>
Newsgroups dev.linux.lists.driver-core,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On 8/7/26 4:49 AM, Danilo Krummrich wrote:
> On Fri Aug 7, 2026 at 3:37 AM CEST, John Hubbard wrote:
>> This seems to expose a way for driver writers to leak work items,
>> doesn't it?
> 
> Yes, I forgot about this for a second; this should be on ScopedWork only (at
> least without further effort to make it work properly for Work too).
> 
> Since you explicitly mention "driver writers", note that unbounded work
> shouldn't really have any (valid) use-cases within drivers. So drivers should
> either use ScopedQueue or ScopedWork.

Yes, agreed. Perhaps I shouldn't have used "drivers" as the example. I was just
trying to show that this exposes an API that will leak refcounts.


thanks,
-- 
John Hubbard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.