Message ID | 1456254303-68512-1-git-send-email-seth.forshee@canonical.com |
---|---|
State | New |
Headers | show |
Quoting Seth Forshee (seth.forshee@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@canonical.com> Acked-by: Serge E. Hallyn <serge.hallyn@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 >
Think it does what it say and assuming it was tested. Though its not strictly required, was there a bug report one could refer to? -Stefan On 23.02.2016 20:05, Seth Forshee wrote: > 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@canonical.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); > } >
On Tue, Feb 23, 2016 at 01:05:03PM -0600, Seth Forshee wrote: > 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. I've found a solution I like better. I'll send a new patch momentarily.
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); }
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@canonical.com> --- fs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)