From: Li Li <dualli@chromium.org>
To: dualli@google.com, gregkh@linuxfoundation.org, arve@android.com,
tkjos@android.com, maco@android.com, joel@joelfernandes.org,
brauner@kernel.org, cmllamas@google.com, surenb@google.com,
arnd@arndb.de, masahiroy@kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, hridya@google.com,
smoreland@google.com
Cc: kernel-team@android.com
Subject: [PATCH v3 0/1] binder: return pending info for frozen async txns
Date: Wed, 23 Nov 2022 12:16:53 -0800 [thread overview]
Message-ID: <20221123201654.589322-1-dualli@chromium.org> (raw)
From: Li Li <dualli@google.com>
User applications need to know if their binder transactions reach a
frozen process or not. For sync binder calls, Linux kernel already
has a dedicated return value BR_FROZEN_REPLY, indicating this sync
binder transaction will be rejected (similar to BR_DEAD_REPLY) as the
target process is frozen. But for async binder calls, the user space
application doesn't have a way to know if the target process is frozen.
This patch adds a new return value, BR_TRANSACTION_PENDING_FROZEN, to
fix this issue. Similar to BR_TRANSACTION_COMPLETE, it means the async
binder transaction has been put in the queue of the target process, but
it's waiting for the target process to be unfrozen.
v1: checkpatch.pl --strict passed
v2: protect proc->is_frozen with lock, fix typo in comments
v3: rename BR_TRANSACTION_PENDING to BR_TRANSACTION_PENDING_FROZEN to
signify the frozen scenario and avoid potential confusion
Li Li (1):
binder: return pending info for frozen async txns
drivers/android/binder.c | 32 +++++++++++++++++++++++------
drivers/android/binder_internal.h | 3 ++-
include/uapi/linux/android/binder.h | 7 ++++++-
3 files changed, 34 insertions(+), 8 deletions(-)
--
2.38.1.584.g0f3c55d4c2-goog
next reply other threads:[~2022-11-23 20:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 20:16 Li Li [this message]
2022-11-23 20:16 ` [PATCH v3 1/1] " Li Li
2022-11-24 2:25 ` Carlos Llamas
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=20221123201654.589322-1-dualli@chromium.org \
--to=dualli@chromium.org \
--cc=arnd@arndb.de \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=devel@driverdev.osuosl.org \
--cc=dualli@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hridya@google.com \
--cc=joel@joelfernandes.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=masahiroy@kernel.org \
--cc=smoreland@google.com \
--cc=surenb@google.com \
--cc=tkjos@android.com \
/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
all inboxes | Powered by JetHome®