Re: Loopback (dir->dir) mounting (NOT -o loop)

From: Alexander Viro (
Date: Sat Jun 03 2000 - 01:54:50 EST

On Fri, 2 Jun 2000, Andries Brouwer wrote:

> # echo "fake::0:0:fake:/:" >> /tmp/pw
> # ls -l /tmp/pw
> -rw-r--r-- 1 root root 2751 Apr 29 21:45 /tmp/pw
> #
> Funny - the file is unchanged. Where did the echoed stuff go?
> Answer: it went to the underlying /tmp/pw, the unmounted one.

What? Oh, fsck... Bug in open_namei()

> # rm /tmp/pw

... and in vfs_unlink() <checking> ... and vfs_rename_other().

Thanks for spotting. OK, I've fixed that in dcache-ac7-J (will be in usual
place when I'll run some tests on it) and I'm making the thing (bind, that
is) root-only for the time being. I still think that making it safe for
regular users is the right thing, but yes, scenario with rm -rf on /tmp is
pretty convincing. End of the story.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:16 EST