lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 May 2008 18:50:47 +1000
From:	David Chinner <dgc@....com>
To:	lkml <linux-kernel@...r.kernel.org>
Cc:	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: [BUG] remount ro on loopback mount leaves unmountable filesystem behind

The following steps will leave an unmountable filesystem
behind. This test "works" using ext3 or XFS. XFS version is
as follows replacing steps with ext3 specific commands results
in the same unmountable filesystem problem:

$ mount -t xfs /dev/sdb6 /mnt/scratch
$ mkdir /mnt/scratch/mnt
$ touch /mnt/scratch/img
$ mkfs.xfs -f -d file,name=/mnt/scratch/img,size=1g
$ mount -t xfs -o loop /mnt/scratch/img /mnt/scratch/mnt

All normal up to here. I can unmount everything just fine.

$ umount /mnt/scratch/mnt
$ umount /mnt/scratch
$

Same thing, but remounting the loop filesystem readonly
before unmounting:

$ mount -t xfs /dev/sdb6 /mnt/scratch
$ mkdir /mnt/scratch/mnt
$ touch /mnt/scratch/img
$ mkfs.xfs -f -d file,name=/mnt/scratch/img,size=1g
$ mount -t xfs -o loop /mnt/scratch/img /mnt/scratch/mnt
$ mount -t xfs -o remount,ro /mnt/scratch/img /mnt/scratch/mnt
$ umount /mnt/scratch/mnt
$ umount /mnt/scratch
umount: /mnt/scratch: device is busy
umount: /mnt/scratch: device is busy
$

At this point /mnt/scratch is unmountable. lsof shows no open
references to the filesytem, so it would seem to be a reference
count leak somewhere....

Reproduced on 2.6.25-rc3 on ia64 and x86_64, and UML on
2.6.26-pre-rc1. Found when changing XFSQA test 073 to host
loopback images and mounts mounts on something other than /tmp.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ