diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-19 02:40:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:38 -0400 |
commit | 8bf9725c29f2589237dd696d06a204230add0ba3 (patch) | |
tree | abe1a29924a592808250121435dcd12789336e8a /fs/namespace.c | |
parent | 2e4a707269a409950c3f315010c20f9719c594e2 (diff) |
pid namespaces: introduce MS_KERNMOUNT flag
This flag tells the .get_sb callback that this is a kern_mount() call so that
it can trust *data pointer to be valid in-kernel one. If this flag is passed
from the user process, it is cleared since the *data pointer is not a valid
kernel object.
Running a few steps forward - this will be needed for proc to create the
superblock and store a valid pid namespace on it during the namespace
creation. The reason, why the namespace cannot live without proc mount is
described in the appropriate patch.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 07daa7972591..860752998fb3 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1411,7 +1411,7 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, | |||
1411 | mnt_flags |= MNT_RELATIME; | 1411 | mnt_flags |= MNT_RELATIME; |
1412 | 1412 | ||
1413 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | | 1413 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | |
1414 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME); | 1414 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT); |
1415 | 1415 | ||
1416 | /* ... and get the mountpoint */ | 1416 | /* ... and get the mountpoint */ |
1417 | retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd); | 1417 | retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd); |