pid namespaces: introduce MS_KERNMOUNT flag
authorPavel Emelyanov <xemul@openvz.org>
Fri, 19 Oct 2007 06:40:02 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 18:53:38 +0000 (11:53 -0700)
commit8bf9725c29f2589237dd696d06a204230add0ba3
treeabe1a29924a592808250121435dcd12789336e8a
parent2e4a707269a409950c3f315010c20f9719c594e2
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>
fs/namespace.c
fs/super.c
include/linux/fs.h