diff options
author | Tao Bao <tbao@google.com> | 2016-09-27 11:15:42 -0700 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2016-09-29 23:12:16 -0700 |
commit | 1eabf5343719aaebd0582c8b83b73f77bbd434dc (patch) | |
tree | c0f6825decaa5f140fe26293bc2617dc3aa3206d /tools/aapt2/diff/Diff.cpp | |
parent | 880e823e9e97f6cae0b96f434b0ad8a71f0fed9f (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
(cherry picked from commit 794c8b0b3fe16051843c22232d58d6b184dde49b)
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions