diff options
| author | 2024-11-19 02:57:22 +0000 | |
|---|---|---|
| committer | 2024-11-19 02:57:22 +0000 | |
| commit | c619ec65b8190b5b67cb1c07565abc8e0228369d (patch) | |
| tree | 5ac37026b6198d448d8f446d5eef231eb3642be1 | |
| parent | 8c297a8694b6a2e06da1519302012530857ddc7f (diff) | |
| parent | f3a12447be302601cf40fcdf2432262e4377bd51 (diff) | |
Merge "libbinder: Return error instead of crashing on closed Trusty connection" into main am: f3a12447be
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3163657
Change-Id: I6cf325ea095bce32c068c9eec28b4c538c697bfb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | libs/binder/trusty/RpcServerTrusty.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/binder/trusty/RpcServerTrusty.cpp b/libs/binder/trusty/RpcServerTrusty.cpp index 17919c2a25..05800464ac 100644 --- a/libs/binder/trusty/RpcServerTrusty.cpp +++ b/libs/binder/trusty/RpcServerTrusty.cpp @@ -151,8 +151,10 @@ int RpcServerTrusty::handleMessage(const tipc_port* /*port*/, handle_t /*chan*/, int RpcServerTrusty::handleMessageInternal(void* ctx) { auto* channelContext = reinterpret_cast<ChannelContext*>(ctx); - LOG_ALWAYS_FATAL_IF(channelContext == nullptr, - "bad state: message received on uninitialized channel"); + if (channelContext == nullptr) { + LOG_RPC_DETAIL("bad state: message received on uninitialized channel"); + return ERR_BAD_STATE; + } auto& session = channelContext->session; auto& connection = channelContext->connection; |