diff options
author | 2022-07-02 02:24:10 +0000 | |
---|---|---|
committer | 2022-07-02 02:24:10 +0000 | |
commit | d69bd1e50c4574085a7b0405b9f0163cef5019df (patch) | |
tree | 9dc2b24a36a3b7367ebbeda6c2880a3c38809e1b /libs/binder/RpcState.cpp | |
parent | 03d255c5f8bbd64e6bf038a23f78c61ab062e934 (diff) | |
parent | a9cca9cbe348979dba47ba9854e1423dd5d9f00e (diff) |
Merge changes I1f676dbf,I622757fc
* changes:
libbinder: build option to disable the kernel IPC, part 2/2
libbinder: build option to disable the kernel IPC, part 1/2
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r-- | libs/binder/RpcState.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index 01311b505f..bde3d90d90 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -36,7 +36,6 @@ namespace android { -using base::ScopeGuard; using base::StringPrintf; #if RPC_FLAKE_PRONE @@ -733,6 +732,7 @@ status_t RpcState::processCommand( const sp<RpcSession::RpcConnection>& connection, const sp<RpcSession>& session, const RpcWireHeader& command, CommandType type, std::vector<std::variant<base::unique_fd, base::borrowed_fd>>&& ancillaryFds) { +#ifdef BINDER_WITH_KERNEL_IPC IPCThreadState* kernelBinderState = IPCThreadState::selfOrNull(); IPCThreadState::SpGuard spGuard{ .address = __builtin_frame_address(0), @@ -742,11 +742,13 @@ status_t RpcState::processCommand( if (kernelBinderState != nullptr) { origGuard = kernelBinderState->pushGetCallingSpGuard(&spGuard); } - ScopeGuard guardUnguard = [&]() { + + base::ScopeGuard guardUnguard = [&]() { if (kernelBinderState != nullptr) { kernelBinderState->restoreGetCallingSpGuard(origGuard); } }; +#endif // BINDER_WITH_KERNEL_IPC switch (command.command) { case RPC_COMMAND_TRANSACT: |