Commit fe5dea5f authored by Alice Ryhl's avatar Alice Ryhl
Browse files

ANDROID: rust_binder: serialize oneway transactions

The binder driver guarantees that oneway transactions sent to the same
node are serialized, that is, userspace will not be given the next one
until it has finished processing the previous oneway transaction. This
is done to avoid the case where two oneway transactions arrive in
opposite order from the order in which they were sent. (E.g., they could
be delivered to two different threads, which could appear as-if they
were sent in opposite order.)

To fix that, we store pending oneway transactions in a separate list in
the node, and don't deliver the next oneway transaction until userspace
signals that it has finished processing the previous oneway transaction
by calling the BC_FREE_BUFFER ioctl.

Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-9-08ba9197f637@google.com/


Change-Id: I7fbe0716a2ecea36ea6a7594ed0e3ce03afe9362
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
Bug: 278052745
parent b67f3900
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment