Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 676fca0e authored by Avichal Rakesh's avatar Avichal Rakesh
Browse files

Camera1: Release mSerializationLock before calling into CameraService

When disconnecting, API1 client calls into CameraService
with mSerializationLock held. CameraService calls internally
serializes on mServiceLock. There are other situations where
CameraService may call into the client with mServiceLock held.

If these two things happen at the same time, there is a chance of
a deadlock as CameraService calls into the API1 client and waits for
mSerializationLock, and API1 client calls into CameraService and waits
for mServiceLock.

To break the cycle, this CL releases mSerializationLock before calling
into CameraService.

Bug: 351778072
Test: atest CtsCameraTestCases:android.hardware.cts.CameraTest
Flag: com.android.internal.camera.flags.api1_release_binderlock_before_cameraservice_disconnect
Change-Id: Ida983882589c568b5bcc610c2d327d9d1b6a9828
parent a990aff4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment