bug with umounting loop devices in busybox 1.10.2
Natanael Copa
natanael.copa at gmail.com
Thu May 22 08:48:32 PDT 2008
hi,
I have noticed a problem with mount or umount in busybox-1.10.2
# /dev/sda1 is ext3
mount /dev/sda1 on /mnt
# mount a loop back device
mkdir /1
mount -o loop /mnt/loopback /1
umount /1
umount /mnt
The result is:
umount: cannot umount /mnt: Device or resource busy
Doing exactly the same works in busybox-1.9.2.
by testing combinations of 1.9.2 and 1.10.2 mount/umount it seems that
the problems lies in the umount of the loopback device.
strace from busybox 1.10.2 umount:
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x5aa77338) = -1 ENOTTY
(Inappropriate ioctl for device)
read(3, "rootfs / rootfs rw 0 0\n/dev/none"..., 4096) = 397
read(3, "", 4096) = 0
close(3) = 0
readlink("/1", 0x5aa75454, 4095) = -1 EINVAL (Invalid argument)
oldumount("/1") = 0
_exit(0) = ?
and strace from busybox-1.9.2 umount of the same loopback:
open("/proc/mounts", O_RDONLY) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x5fd8d9d4) = -1 ENOTTY
(Inappropriate ioctl for device)
read(3, "rootfs / rootfs rw 0 0\n/dev/none"..., 4096) = 397
brk(0x10c99000) = 0x10c99000
read(3, "", 4096) = 0
close(3) = 0
readlink("/1", 0x5fd8baf0, 4095) = -1 EINVAL (Invalid argument)
oldumount("/1") = 0
open("/dev/loop1", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, 0x4c01, 0) = 0
close(3) = 0
_exit(0) = ?
looks like it used to do something with loop device that it no longer
does.
thanks!
-nc
More information about the busybox
mailing list