commit | fb7e268552867da13229eb8d8aee77dee4f6d2bc | [log] [tgz] |
---|---|---|
author | David Anderson <dvander@google.com> | Wed Aug 09 10:31:56 2023 -0700 |
committer | David Anderson <dvander@google.com> | Tue Aug 15 15:14:01 2023 -0700 |
tree | 2ee52ddbe0a75257f9d7a138341ae9ec12a7986f | |
parent | 8d9940bdaf637fcefaf6d1f91212de7a0d0d8da7 [diff] |
snapuserd: Fix race condition in MergeWorker::WaitForMergeBegin. The pre-conditions and post-conditions to cv.wait() in this function are different, which leads to a race. If the merge is never initiated, but I/O is terminated, the wait() will hang. This is easy to hit in tests where I/O terminates quickly, but should not affect actual OTA flow in practice. Bug: 269361087 Test: snapuserd_test Change-Id: I85ed9c357031ec6fd74d6a3f49d85e6cbb037eee