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

Commit 8ce2c687 authored by Sai Kumar Sanagavarapu's avatar Sai Kumar Sanagavarapu Committed by Linux Build Service Account
Browse files

CameraService: Fix deadlock in binder death cleanup.

Issue:
In the event of a binder death, there is a chance of deadlock
due to recursive lock acquisition in the death handling sequence.

Fix:
Clear evicted client list before acquiring service lock.

CRs-Fixed: 984249
Change-Id: I6fc5fa6e01c002bc46be058fcd977be14cae0270
parent 13fffc9a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1692,7 +1692,8 @@ bool CameraService::evictClientIdByRemote(const wp<IBinder>& remote) {
                ret = true;
            }
        }

        //clear the evicted client list before acquring service lock again.
        evicted.clear();
        // Reacquire mServiceLock
        mServiceLock.lock();