Re: [PATCH] proc: fix mount -t proc -o AAA
From: Andrew Morton
Date: Mon Mar 26 2012 - 18:37:36 EST
On Sun, 25 Mar 2012 18:23:16 -0400
> On Sun, 25 Mar 2012 19:36:12 +0400, Vasiliy Kulikov said:
> > On Sun, Mar 25, 2012 at 09:24 +0200, Arkadiusz MiEkiewicz 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...
It surprises me ;) I never noticed that before.
It does seem pretty insane. I wonder how much downstream damage would
result from fixing it.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/