From: Greg KH <gregkh@linuxfoundation.org>
To: Ashutosh Desai <ashutoshdesai993@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust: add task_work abstraction
Date: Wed, 22 Apr 2026 07:37:08 +0200 [thread overview]
Message-ID: <2026042244-repent-uncorrupt-4e2b@gregkh> (raw)
In-Reply-To: <20260422003117.929304-1-ashutoshdesai993@gmail.com>
On Wed, Apr 22, 2026 at 12:31:17AM +0000, Ashutosh Desai wrote:
> On Tue, Apr 21, 2026 at 08:44:01AM +0200, Greg KH wrote:
> > Do you have a user for this binding so that we can see how it is being
> > used to determine if it is correct?
>
> The motivating user is drivers/android/binder/deferred_close.rs, which
> calls bindings::init_task_work() and bindings::task_work_add() directly.
>
> Converting it is non-trivial - the current code schedules the task work
> before closing the fd on purpose, so it can bail out if scheduling fails
> without having already removed the fd. Our API requires the data to be
> ready before calling add(), which would reverse that order and change the
> error semantics of close_fd().
>
> Happy to send a v2 with a conversion patch if that is the preferred
> approach, or to discuss the design first if needed.
Having a user of it is key to see if the new api actually does work well
or not. On it's own, it can be hard to determine.
thanks,
greg k-h
prev parent reply other threads:[~2026-04-22 5:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 6:38 [PATCH] rust: add task_work abstraction Ashutosh Desai
2026-04-21 6:44 ` Greg KH
2026-04-22 0:31 ` Ashutosh Desai
2026-04-22 5:37 ` Greg KH [this message]
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=2026042244-repent-uncorrupt-4e2b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=ashutoshdesai993@gmail.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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