From: John Hubbard <jhubbard@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>
Cc: tj@kernel.org, jiangshanlai@gmail.com, aliceryhl@google.com,
ojeda@kernel.org, boqun@kernel.org, gary@garyguo.net,
bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, tmgross@umich.edu,
daniel.almeida@collabora.com, tamird@kernel.org,
acourbot@nvidia.com, work@onurozkan.dev,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
driver-core@lists.linux.dev
Subject: Re: [PATCH 6/7] rust: workqueue: add Work::cancel_work_sync()
Date: Fri, 7 Aug 2026 12:31:26 -0700 [thread overview]
Message-ID: <4b889de5-418a-4f36-bfe8-f48d2f84ba60@nvidia.com> (raw)
In-Reply-To: <DKIOSPRHO8V1.286KQFRH751TE@kernel.org>
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
next prev parent reply other threads:[~2026-08-07 19:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 19:52 [PATCH 0/7] workqueue OwnedQueue, ScopedQueue and ScopedWork Danilo Krummrich
2026-08-04 19:52 ` [PATCH 1/7] rust: workqueue: replace deprecated system_wq with system_{percpu,dfl}_wq Danilo Krummrich
2026-08-04 19:52 ` [PATCH 2/7] rust: workqueue: restrict delayed work to global wqs Danilo Krummrich
2026-08-04 19:52 ` [PATCH 3/7] rust: workqueue: create workqueue subdirectory Danilo Krummrich
2026-08-04 19:52 ` [PATCH 4/7] rust: workqueue: add creation of workqueues Danilo Krummrich
2026-08-04 19:52 ` [PATCH 5/7] rust: workqueue: add ScopedQueue for lifetime bound items Danilo Krummrich
2026-08-04 19:52 ` [PATCH 6/7] rust: workqueue: add Work::cancel_work_sync() Danilo Krummrich
2026-08-07 1:37 ` John Hubbard
2026-08-07 11:49 ` Danilo Krummrich
2026-08-07 19:31 ` John Hubbard [this message]
2026-08-07 7:51 ` Onur Özkan
2026-08-07 11:51 ` Danilo Krummrich
2026-08-04 19:52 ` [PATCH 7/7] rust: workqueue: add ScopedWork for non-'static work items Danilo Krummrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b889de5-418a-4f36-bfe8-f48d2f84ba60@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tj@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox