On Thu, Aug 8, 2019 at 1:45 PM Ryan Prichard <[email protected]> wrote: > > On Thu, Aug 8, 2019 at 5:51 AM Rob Landley <[email protected]> wrote: >> >> On 8/6/19 5:08 PM, Ryan Prichard wrote: >> > On Tue, Aug 6, 2019 at 1:56 PM Rob Landley <[email protected] >> > <mailto:[email protected]>> wrote: >> > >> > On 8/5/19 7:40 PM, Ryan Prichard via Toybox wrote: >> > > I think this patch fixes a race I noticed, but in practice I was >> > hitting a >> > > different race. After LOOP_CTL_GET_FREE had created a new loop >> > device, losetup >> > > tried to open /dev/block/loopXXX before the device file existed, >> > >> > Why is the ioctl returning before the block device exists? >> > >> > >> > I think the /dev/block/loopXXX file is created by a userspace daemon >> > (probably >> > ueventd in Android). The ioctl creates the kernel device, then sends an >> > asynchronous uevent message to ueventd about the new device. ueventd and >> > losetup >> > then race each other to create the file and to open it. >> >> So wait, you're _not_ using devtmpfs? > > > The Android devices I've seen all use an ordinary tmpfs on /dev, not devtmpfs. > > (on a walleye device) > $ adb shell mount | grep ' /dev ' > tmpfs on /dev type tmpfs > (rw,seclabel,nosuid,relatime,size=1853688k,nr_inodes=463422,mode=755)
i think Rob thought that it would cure your race, but as he seems to have discovered later (and i remember Tom explaining to me when i asked him the same question months ago), it just moves the problem around rather than actually fixing it. > -Ryan > _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
