summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-06-04 00:58:31 +0000
committer Steven Moreland <smoreland@google.com> 2021-06-04 00:59:58 +0000
commita6e11cf579fc68aafaf541b3fd43d3bcaccb0448 (patch)
treeb1473652cd8cce7f05416f57f38750b84e7b2e7c
parent31bde7a0dd403b954b878c1b6f13b561e3802ddd (diff)
libbinder: RPC BinderNode erase checks asyncTodo
Recently, this code was changed to guarantee that no pending async transactions can be deleted, but now it is explicitly checked when we delete nodes. Bug: 183140903 Test: binderRpcTest Change-Id: I6aede64ef99c5464092448b54630fd3a7a43c9e1
-rw-r--r--libs/binder/RpcState.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index 6e7088f543..08bf4ec068 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -813,6 +813,8 @@ sp<IBinder> RpcState::tryEraseNode(std::map<RpcAddress, BinderNode>::iterator& i
ref = std::move(it->second.sentRef);
if (it->second.timesRecd == 0) {
+ LOG_ALWAYS_FATAL_IF(!it->second.asyncTodo.empty(),
+ "Can't delete binder w/ pending async transactions");
mNodeForAddress.erase(it);
}
}