From 6aae53692e0a81ae263e25927214e79808cfdb38 Mon Sep 17 00:00:00 2001 From: Andrei Homescu Date: Thu, 26 Jan 2023 00:42:54 +0000 Subject: libbinder: Flush excess refs after single async transaction After processing a single async transaction, RpcState previously returned without flushing the excess Binder references. This fixes the control flow so that the refs get flushed for any number of transactions. Bug: 259517277 Test: trusty_stats_test Change-Id: I2665f3b0d6120d4d79f46ef5141c9ff5f85fd5b5 --- libs/binder/RpcState.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index b27f1028d4..1ea13f9a1c 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -1036,8 +1036,8 @@ processTransactInternalTailCall: return DEAD_OBJECT; } - if (it->second.asyncTodo.size() == 0) return OK; - if (it->second.asyncTodo.top().asyncNumber == it->second.asyncNumber) { + if (it->second.asyncTodo.size() != 0 && + it->second.asyncTodo.top().asyncNumber == it->second.asyncNumber) { LOG_RPC_DETAIL("Found next async transaction %" PRIu64 " on %" PRIu64, it->second.asyncNumber, addr); -- cgit v1.2.3-59-g8ed1b