[Toybox] [PATCH] losetup: fix the race.

enh enh at google.com
Mon Aug 5 16:34:58 PDT 2019


There's a race between LOOP_CTL_GET_FREE and LOOP_SET_FD. Work around it
by just retrying if we get EBUSY on the LOOP_SET_FD call. This is what
similar code in ChromeOS already does.

Bug: http://b/135716654
---
 toys/other/losetup.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-losetup-fix-the-race.patch
Type: text/x-patch
Size: 2493 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190805/0064ea29/attachment-0002.bin>


More information about the Toybox mailing list