From: Ashutosh Desai <ashutoshdesai993@gmail.com>
To: gregkh@linuxfoundation.org
Cc: "Ashutosh Desai" <ashutoshdesai993@gmail.com>,
"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 00:31:17 +0000 [thread overview]
Message-ID: <20260422003117.929304-1-ashutoshdesai993@gmail.com> (raw)
In-Reply-To: <2026042140-trickily-apprehend-0076@gregkh>
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.
Thanks,
Ashutosh
prev parent reply other threads:[~2026-04-22 0:31 UTC|newest]
Thread overview: 3+ 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 [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=20260422003117.929304-1-ashutoshdesai993@gmail.com \
--to=ashutoshdesai993@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--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