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

Commit 606039cf authored by Carlos Llamas's avatar Carlos Llamas
Browse files

libbinder: assert freeze notification result



There is an unknown scenario that leads to a frozen notification state
mismatch between userspace and the kernel. When the app then attempts to
unregister the callback, the driver returns an -EINVAL as there is no
active notification setup for that handle.

However, flushCommands() simply drops the error without handling it and
the now-obsolete BC_CLEAR_FREEZE_NOTIFICATION remains at the head of the
mOut buffer. Every subsequent communication attemps fail as the driver
continues to process the same failing command.

It was reported that this scenario caused thousands of binder references
to be leaked, as subsequent commands such as BC_RELEASE and BC_DECREFS
would fail to be processed. This renders the phone unresponsive.

For now, use a big hammer and crash the app when we find errors sent
from the driver. This should help to root-cause how the state mismatch
happens when we add/remove the frozen notifications.

Bug: 416678481
Bug: 422905364
Flag: EXEMPT bugfix
Change-Id: I1a689e9aebb06d1ccffbc2faa504edce9e754065
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
parent c8305547
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment