summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraService.h
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2015-09-04 14:15:58 -0700
committerEino-Ville Talvala <etalvala@google.com>2015-09-04 15:47:17 -0700
commit24901c86e10a0923fe10f5e9bce5e6dba061a289 (patch)
tree178597477c4a44e371a273069ea4089113e33c14 /services/camera/libcameraservice/CameraService.h
parent8f1ee70c56aad841e4b9b569243d830ece04fdfe (diff)
downloadframeworks_av-24901c86e10a0923fe10f5e9bce5e6dba061a289.zip
frameworks_av-24901c86e10a0923fe10f5e9bce5e6dba061a289.tar.gz
frameworks_av-24901c86e10a0923fe10f5e9bce5e6dba061a289.tar.bz2
CameraService: Link to client binder death at end of connect
If, within a binder Looper thread, a Binder object death notifier is registered, and then a nested Binder transaction is begun, that transaction may process a death notification callback for the just-registered object, if it was dead at the time of registration. This can lead to an unexpected nested call into the service, and cause deadlock. To avoid this, move the death notifier registration to the end of handling the connect transaction. Also remove one extra bit of disconnect logging. Bug: 23525545 Change-Id: If01cbaf42704f55134118afefc9a8f7bdb014e09
Diffstat (limited to 'services/camera/libcameraservice/CameraService.h')
-rw-r--r--services/camera/libcameraservice/CameraService.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index 330a19d..cd97b08 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -873,11 +873,6 @@ status_t CameraService::connectHelper(const sp<CALLBACK>& cameraCb, const String
return ret;
}
- sp<IBinder> remoteCallback = client->getRemote();
- if (remoteCallback != nullptr) {
- remoteCallback->linkToDeath(this);
- }
-
// Update shim paremeters for legacy clients
if (effectiveApiLevel == API_1) {
// Assume we have always received a Client subclass for API1