[PATCH][xenial] UBUNTU: SAUCE: fs: Allow psuedo-fs superblocks to be reused in other namespaces
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Feb 23 19:15:41 UTC 2016
Quoting Seth Forshee (seth.forshee at canonical.com):
> For psuedo filesystems it's not critical that s_user_ns match the
> user namespace where the superblock is being mounted, and this
> check is currently breaking cgroup namespaces. Skip the check
> for psuedo filesystems.
>
> Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> ---
> fs/super.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/super.c b/fs/super.c
> index 732bffa..1f2bfd7 100644
> --- a/fs/super.c
> +++ b/fs/super.c
> @@ -471,7 +471,8 @@ retry:
> hlist_for_each_entry(old, &type->fs_supers, s_instances) {
> if (!test(old, data))
> continue;
> - if (user_ns != old->s_user_ns) {
> + if ((type->fs_flags & FS_REQUIRES_DEV) &&
> + user_ns != old->s_user_ns) {
> spin_unlock(&sb_lock);
> return ERR_PTR(-EBUSY);
> }
> --
> 1.9.1
>
More information about the kernel-team
mailing list