Re: [PATCH 2/2] ns: Add proc_ns_operations for mount namespaces

From: Pavel Emelyanov
Date: Sat May 12 2012 - 07:42:47 EST

On 05/11/2012 09:05 PM, Eric W. Biederman wrote:
> Pavel Emelyanov <xemul@xxxxxxxxxxxxx> writes:
>> Currently LXC by default creates a container in a new mount
>> namespace. Thus in order to explore it we have to
>> a) find out, that a new mount namespace is in use
>> b) enter this other namespace
>> This patch solves both -- allows us to distinguish one mount
>> namespace from another by comparing its inode numbers and lets
>> us enter a mount namespace with the setns system call.
> There are two significant bugs with your patch.
> You do not set fs->root or fs->pwd to values in the new mount namespace,
> I don't believe there is anywhere else in the vfs where this is possible
> except possible fchdir.
> It is easily possible to create a reference counting cycle by bind
> mounting the current mount namespace into itself.
> Not that I am opposed to the concept I have just been dusting my patch
> for this same functionality off.

Oh, that's just perfect. Let's move your one then. Hopefully it won't
get covered with dust again.

> Eric
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at