set_loop tries to create 1048575 loop devices

Ralf Friedl Ralf.Friedl at online.de
Mon Jan 20 16:52:24 UTC 2014


Hi

I just had mount create a large number of loop devices before I 
interrupted it.
The reason is that the loop module is not loaded in the kernel, but it 
would be better to have an error message instead.

Here ist the strace output:
stat64("/dev/loop0", 0x7ffd8840)        = -1 ENOENT (No such file or 
directory)
mknod("/dev/loop0", S_IFBLK|0644, makedev(7, 0)) = 0
open("/dev/loop0", O_RDONLY|O_LARGEFILE) = -1 ENXIO (No such device or 
address)
stat64("/dev/loop1", 0x7ffd8840)        = -1 ENOENT (No such file or 
directory)
mknod("/dev/loop1", S_IFBLK|0644, makedev(7, 1)) = 0
open("/dev/loop1", O_RDONLY|O_LARGEFILE) = -1 ENXIO (No such device or 
address)
...
stat64("/dev/loop255", 0x7ffd8840)      = -1 ENOENT (No such file or 
directory)
mknod("/dev/loop255", S_IFBLK|0644, makedev(7, 255)) = 0
open("/dev/loop255", O_RDONLY|O_LARGEFILE) = -1 ENXIO (No such device or 
address)
stat64("/dev/loop256", 0x7ffd8840)      = -1 ENOENT (No such file or 
directory)
mknod("/dev/loop256", S_IFBLK|0644, makedev(7, 0)) = 0
open("/dev/loop256", O_RDONLY|O_LARGEFILE) = -1 ENXIO (No such device or 
address)
...

I don't know whether there are other reasons why open /dev/loop might 
return ENXIO, but if not, then set_loop should abort when it receives 
that error.

Regards
Ralf


More information about the busybox mailing list