Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 984bcc2a authored by Marco Ballesio's avatar Marco Ballesio Committed by Rohit Sekhar
Browse files

BACKPORT: FROMGIT: binder: BINDER_FREEZE ioctl

Frozen tasks can't process binder transactions, so a way is required to
inform transmitting ends of communication failures due to the frozen
state of their receiving counterparts. Additionally, races are possible
between transitions to frozen state and binder transactions enqueued to
a specific process.

Implement BINDER_FREEZE ioctl for user space to inform the binder driver
about the intention to freeze or unfreeze a process. When the ioctl is
called, block the caller until any pending binder transactions toward
the target process are flushed. Return an error to transactions to
processes marked as frozen.

Bug: 180989544
(cherry picked from commit 15949c3cdd97bccdcd45c0c0f6c31058520b6494
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git

 char-misc-testing)
Co-developed-by: default avatarTodd Kjos <tkjos@google.com>
Acked-by: default avatarTodd Kjos <tkjos@google.com>
Signed-off-by: default avatarMarco Ballesio <balejs@google.com>
Signed-off-by: default avatarTodd Kjos <tkjos@google.com>
Signed-off-by: default avatarLi Li <dualli@google.com>
Link: https://lore.kernel.org/r/20210316011630.1121213-2-dualli@chromium.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ia1b5951cd99eeb98b59e06c3e27d59062dc725f6
parent 5ef7ecbc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment