summaryrefslogtreecommitdiff
path: root/libpackagelistparser/packagelistparser_test.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-07-11 13:09:42 -0700
committerDavid Anderson <dvander@google.com>2019-07-11 15:39:53 -0700
commit4f9d1b15b48175d380abc85ed9e1fbba4fcbd96e (patch)
tree1fafe234995edbd603039b4a3d63e3f9ce080a55 /libpackagelistparser/packagelistparser_test.cpp
parent470fe2b5f07aa947dc61f5978803d194b5df33d8 (diff)
libdm: Fix race conditions in LoopControl::Attach.
This fixes two race conditions in LoopControl::Attach(). The first is that after LOOP_CTL_GET_FREE, the path is not be available until it has been processed by ueventd. This can be fixed by adding a timeout parameter and a call to WaitForFile(). Second, it is possible (albeit unlikely), given that loop devices are now being used more aggressively, that two processes race when attempting LOOP_SET_FD. In this case, one process will win, and the other will fail with EBUSY. We can handle this case by retrying the operation while respecting the same timeout parameter. Bug: 135771280 Test: libdm_test gtest Change-Id: Icf9facc3ca28fdb6ff5c78612d3dc183fa47b1f3
Diffstat (limited to 'libpackagelistparser/packagelistparser_test.cpp')
0 files changed, 0 insertions, 0 deletions