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

Skip to content
Commit 2843c36c authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Limit the scope 'mTrackerLock' within 'disconnectImpl'

'disconnectImpl' holds 'mTrackerLock' for its entire scope.
This is not needed and could lead to deadlocks in case the
request thread encounters errors and tries to clean up
any failed requests. In this scenario the request thread will
already hold 'mInflightLock' and then try to acquire
'mTrackerLock' as well. The 'disconnectImpl' context will
acquire 'mTrackerLock' first and at some later point try to
get 'mInflightLock' which will end up in a deadlock.
To avoid this, limit the scope of 'mTrackerLock' within
'disconnectImpl'. The lock purpose is to protect other threads
from accessing invalid 'mStatusTracker' instances and must not
introduce side effects.

Bug: 115784704
Test: Camera CTS, Manual test

Change-Id: I96b039cb454e0c185ecdf0c8072a9494233c1169
parent 6976bebc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment