commit | 02e20295f581b614eb8fd08d843401444c3c0400 | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Tue Sep 28 17:53:34 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Sep 28 17:53:34 2021 +0000 |
tree | 6cfeac38188176b40e727bb6c2775db363f88cd9 | |
parent | 9ad48c526ffab1b7a6c864168a47fd302f35efb1 [diff] | |
parent | 650484d2c947a0a49a940478b7629c5cc25f756e [diff] |
Merge "libbinder: RPC avoid FdTrigger shutdown race" am: 13ba6f3c3f am: f2e316ac20 am: 650484d2c9 Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1838242 Change-Id: I73bb5db5dd5b52e0e705bdc3d4a8d964b189afee
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp index 5733993..4c61a59 100644 --- a/libs/binder/RpcServer.cpp +++ b/libs/binder/RpcServer.cpp
@@ -205,8 +205,11 @@ } mShutdownTrigger->trigger(); + for (auto& [id, session] : mSessions) { (void)id; + // server lock is a more general lock + std::lock_guard<std::mutex> _lSession(session->mMutex); session->mShutdownTrigger->trigger(); }