2000-12-05 21:35:55

by Tigran Aivazian

[permalink] [raw]
Subject: [bug] vfsmount->count accounting broken again?

Hi,

Imagine two ext2 filesystems

/dev/hda1 mounted rw on /boot
/dev/hda3 mounted rw on /usr/src

now mount /dev/hda3 also on /boot

mount -t ext2 /dev/hda3 /boot

this succeeds, which is expected. Now umount it.

umount /boot

this also succeeds, which is expected. Now do df(1) and notice that
/etc/mtab is corrupted and no longer shows the old /boot filesystem even
though we know (from /proc/mounts) that it is mounted. This is a bug but a
userspace one (should mail Andries later, probably util-linux). Now, the
interesting bit, i.e. the kernel bug:

umount /boot

this fails with EBUSY. So, I think the reference count has gone wrong
somewhere -- I will put debugging code in do_umount() and see, but
everyone is welcome to fix it before I do so...

Regards,
Tigran


2000-12-05 21:39:37

by Dunlap, Randy

[permalink] [raw]
Subject: RE: [bug] vfsmount->count accounting broken again?

Andries wrote Monday 4-dec-2000 about a umount patch
for this:

Now that there was some discussion about umount,
I released a version of mount/umount that perhaps
has a slightly better behaviour. Since the change
was largish (and is untested), don't put it blindly
into your distribution.
Another change was one intended to make things behave
a bit better for Japanese (with variable width characters).
Since I changed the patch a bit, it is quite possible
I broke things both for Japanese and English.

Andries - [email protected]

ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/
-

I haven't tried it yet.

~Randy
_______________________________________________
|randy.dunlap_at_intel.com 503-677-5408|
|NOTE: Any views presented here are mine alone|
|& may not represent the views of my employer.|
-----------------------------------------------

> -----Original Message-----
> From: Tigran Aivazian [mailto:[email protected]]
> Sent: Tuesday, December 05, 2000 1:07 PM
> To: [email protected]
> Subject: [bug] vfsmount->count accounting broken again?
>
>
> Hi,
>
> Imagine two ext2 filesystems
>
> /dev/hda1 mounted rw on /boot
> /dev/hda3 mounted rw on /usr/src
>
> now mount /dev/hda3 also on /boot
>
> mount -t ext2 /dev/hda3 /boot
>
> this succeeds, which is expected. Now umount it.
>
> umount /boot
>
> this also succeeds, which is expected. Now do df(1) and notice that
> /etc/mtab is corrupted and no longer shows the old /boot
> filesystem even
> though we know (from /proc/mounts) that it is mounted. This
> is a bug but a
> userspace one (should mail Andries later, probably
> util-linux). Now, the
> interesting bit, i.e. the kernel bug:
>
> umount /boot
>
> this fails with EBUSY. So, I think the reference count has gone wrong
> somewhere -- I will put debugging code in do_umount() and see, but
> everyone is welcome to fix it before I do so...
>
> Regards,
> Tigran
>
> -

2000-12-05 21:41:47

by Tigran Aivazian

[permalink] [raw]
Subject: RE: [bug] vfsmount->count accounting broken again?

On Tue, 5 Dec 2000, Dunlap, Randy wrote:

> Andries wrote Monday 4-dec-2000 about a umount patch
> for this:

Randy, presumably you mean the userspace side, yes? I.e. not the kernel
bug I reported. I should have put a subject [two bugs] instead of [bug].

Regards,
Tigran

2000-12-05 21:56:44

by Tigran Aivazian

[permalink] [raw]
Subject: [FALSE ALLERT]Re: [bug] vfsmount->count accounting broken again?

Ok, more info on the "kernel bug" -- the /boot filesystem was busy to
begin with so no wonder it remained busy afterwards....

So, there was only one bug for certain and that's the userspace one but
looks like Andries has taken care of that one already.



On Tue, 5 Dec 2000, Tigran Aivazian wrote:

> Hi,
>
> Imagine two ext2 filesystems
>
> /dev/hda1 mounted rw on /boot
> /dev/hda3 mounted rw on /usr/src
>
> now mount /dev/hda3 also on /boot
>
> mount -t ext2 /dev/hda3 /boot
>
> this succeeds, which is expected. Now umount it.
>
> umount /boot
>
> this also succeeds, which is expected. Now do df(1) and notice that
> /etc/mtab is corrupted and no longer shows the old /boot filesystem even
> though we know (from /proc/mounts) that it is mounted. This is a bug but a
> userspace one (should mail Andries later, probably util-linux). Now, the
> interesting bit, i.e. the kernel bug:
>
> umount /boot
>
> this fails with EBUSY. So, I think the reference count has gone wrong
> somewhere -- I will put debugging code in do_umount() and see, but
> everyone is welcome to fix it before I do so...
>
> Regards,
> Tigran
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> Please read the FAQ at http://www.tux.org/lkml/
>


2000-12-05 22:01:44

by Dunlap, Randy

[permalink] [raw]
Subject: RE: [bug] vfsmount->count accounting broken again?

> > Andries wrote Monday 4-dec-2000 about a umount patch
> > for this:
>
> Randy, presumably you mean the userspace side, yes? I.e. not
> the kernel
> bug I reported. I should have put a subject [two bugs]
> instead of [bug].

Right. Sorry I wasn't more clear about that.

~Randy