From: "Danilo Krummrich" <dakr@kernel.org>
To: "Boqun Feng" <boqun@kernel.org>
Cc: <lossin@kernel.org>, <gary@garyguo.net>, <ojeda@kernel.org>,
<bjorn3_gh@protonmail.com>, <a.hindborg@kernel.org>,
<aliceryhl@google.com>, <tmgross@umich.edu>,
<daniel.almeida@collabora.com>, <tamird@kernel.org>,
<acourbot@nvidia.com>, <work@onurozkan.dev>, <lyude@redhat.com>,
<deborah.brouwer@collabora.com>, <rust-for-linux@vger.kernel.org>,
<driver-core@lists.linux.dev>, <stable@vger.kernel.org>,
"Sashiko" <sashiko-bot@kernel.org>
Subject: Re: [PATCH 2/2] rust: revocable: fix race between concurrent revokers
Date: Fri, 19 Jun 2026 00:24:12 +0200 [thread overview]
Message-ID: <DJCIZMUFKMTK.BO46M40UO3XY@kernel.org> (raw)
In-Reply-To: <ajRknQIsXaHtDzzJ@MacBook-0RXW5>
On Thu Jun 18, 2026 at 11:35 PM CEST, Boqun Feng wrote:
> This issue happens particularly when we want to save the extra refcount
> (and indirect reference), and I think this is the issue that `Foo`
> should handle instead of `Revocable`. So maybe we should move the fix
> into `Devres` layer? Thoughts?
>
> (I'm still hoping there could be some lightweight usage of Revocable
> other than Devres, hence the ask.)
I agree that a "lightweight" usage of Revocable is reasonable, and we can still
have that; nothing prevents that (see below).
We could also turn it around and have revoke_wait() and make no wait the
default, but I think it is a bit of a footgun.
Another alternative would be a new type over Revocable, which may be a bit
cleaner. (Although in that case I can also just move it into Devres for now, as
it is the sole user of Revocable anyway.)
>> If needed, a revoke_no_wait() variant that does not wait for concurrent
>> revocations to complete can be added in the future.
next prev parent reply other threads:[~2026-06-18 22:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 19:32 [PATCH 0/2] rust: revocable: fix potential race between concurrent revokers Danilo Krummrich
2026-06-18 19:32 ` [PATCH 1/2] pin-init: add PinInit::map_err() for error type conversion Danilo Krummrich
2026-06-18 19:32 ` [PATCH 2/2] rust: revocable: fix race between concurrent revokers Danilo Krummrich
2026-06-18 21:35 ` Boqun Feng
2026-06-18 22:24 ` Danilo Krummrich [this message]
2026-06-18 22:28 ` Boqun Feng
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=DJCIZMUFKMTK.BO46M40UO3XY@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=deborah.brouwer@collabora.com \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sashiko-bot@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tamird@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