2005-03-21 10:28:18

by Tvrtko Ursulin

[permalink] [raw]
Subject: do_umount strangeness?

[Reposted due to wrong LKML address, sorry Al]

Hi,

Looking at linux-2.6.11/fs/namespace.c line 418:

if (mnt == current->fs->rootmnt && !(flags & MNT_DETACH)) {
/*
* Special case for "unmounting" root ...

I wonder is this really a test for root? Couldn't the current->fs->rootmnt
"point" somewhere else if per-process namespaces are used? Is it intended
that processes can't umount their own root, or better to say, to only be
able to remount it read-only?