diff options
author | Tao Bao <tbao@google.com> | 2016-09-27 11:15:42 -0700 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2016-09-29 16:07:19 -0700 |
commit | 794c8b0b3fe16051843c22232d58d6b184dde49b (patch) | |
tree | 9165917ea4d7b2d036e4731d47a16dfefb42ff84 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | f0aa998233c308fcc945493135448dfe51fb39b7 (diff) |
Handle the race condition when calling uncrypt services.
We call uncrypt services to setup / clear bootloader control block (BCB)
for scheduling tasks under recovery (applying OTAs, performing FDR).
However, we cannot start multiple requests simultaneously. Because they
all use the same socket (/dev/socket/uncrypt) for communication and init
deletes the socket on service exits.
This CL fixes the issue by a) adding synchronized blocks for the service
requests; b) checking the availability of the socket before initiating a
new one.
Note that adding synchronized blocks to RecoverySystem doesn't help,
because the calls could be made from different processes (e.g. priv-app,
system_server).
Bug: 31526152
Test: FDR works while a priv-app keeps calling clear BCB.
Change-Id: I95308989e849a9c98a9503ac509f2bc51ed3de19
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions