Re: [PATCH] proc: fix mount -t proc -o AAA

From: Valdis . Kletnieks
Date: Sun Mar 25 2012 - 18:24:10 EST


On Sun, 25 Mar 2012 19:36:12 +0400, Vasiliy Kulikov said:
> On Sun, Mar 25, 2012 at 09:24 +0200, Arkadiusz MiÅ?kiewicz wrote:
> > but there is another problem - unmounting it and mounting without options
> > causes old option to persist:
> >
> > # mount none /proc -t proc -o hidepid=2
> > # umount /proc
> > # mount none /proc -t proc
> > # grep "/proc" /proc/mounts
> > none /proc proc rw,relatime,hidepid=2 0 0
> >
> > There should be no hidepid=2 now.
>
> No, that's an expected behaviour.

"You keep using that word. I do not think it means what you think it means". ;)

> Procfs is a special filesystem.

And the fact it's "special" makes this *unexpected* behavior. Are there
any other filesystems where -o values will persist across an unmount
and then take effect *even if no -o is given* on a subsequent mount?

Yes, it may be what the code actually *does*, but it certainly violates
the Principle of Least Surprise...

Attachment: pgp00000.pgp
Description: PGP signature