diff options
| author | 2018-05-25 12:09:51 -0700 | |
|---|---|---|
| committer | 2018-05-25 14:40:51 -0700 | |
| commit | 9339952bfc64103c1a3c51d1150719d7289995b4 (patch) | |
| tree | 62d473a601f19901f399b14d5c0eb718620684a3 /opengl/libagl/matrix.cpp | |
| parent | c61c0c1193d493f97f3a8657b75c5256a70aea3a (diff) | |
surfaceflinger: fix race condition
surfaceflinger only has one thread.
main thread is:
a). startHidlServices
b). do a getService
c). getService receives notification on binder thread and returns
d). binder ServiceManager register SF service
Then, started by a).
hwbinder thread is (DisplayService's, when it receives a transaction):
e). binder ServiceManager get SF service ( (d) must happen first! )
Normally, (e) never happens because nothing calls into DisplayService
until later. However, on a particular QCOM device (b/80061790),
surfaceflinger restarts at just the right time that this sequence happens:
(a) (b) (e)
then (c) is blocked since (e) is on a binder thread).
Test: QCOM device no longer enters this deadlock
Test: boot up on Pixel device
Test: (sanity) check to make sure surface flinger has one hwbinder thread
Test: (sanity) make sure Pixel device surface flinger doesn't register an
    allocator when it isn't supposed to.
As a follow-up, the return values from these various services will be
checked.
Bug: 80061790
Change-Id: I254d70951ee9508790c940240bcd1da5af746dd3
Diffstat (limited to 'opengl/libagl/matrix.cpp')
0 files changed, 0 insertions, 0 deletions