commit | cadab3b844cb84d2db08c6db9708fc92763299f3 | [log] [tgz] |
---|---|---|
author | David Anderson <dvander@google.com> | Tue Jan 12 23:04:02 2021 -0800 |
committer | David Anderson <dvander@google.com> | Tue Jan 12 23:21:57 2021 -0800 |
tree | 08d6dd0e96e50482ed29f6cafc17beeb596719e8 | |
parent | 8376d87e2da39b9a3fe1034f3ce0a5ecbc4d6369 [diff] |
libsnapshot: Fix a race condition in WaitForDelete. WaitForDelete is supposed to block until close() has been called on the COW image. However, it could race with the destructor for Snapuserd since nothing guaranteed it was freed within the global lock. This patch fixes the bug and refactors the surrounding code to make the responsibilities of each thread clearer. Bug: N/A Test: vts_libsnapshot_test Change-Id: Icfc264e6dff378db585c81cde381cc24269f4800