Skip to content
Snippets Groups Projects
Commit 92497350 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull vfs mount infrastructure fix from Al Viro:
 "Fixup for sysfs braino.

  Capabilities checks for sysfs mount do include those on netns, but
  only if CONFIG_NET_NS is enabled. Sorry, should've caught that
  earlier..."

* 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fix sysfs_init_fs_context() in !CONFIG_NET_NS case
parents 9c7dc824 ab81dabd
No related branches found
No related tags found
No related merge requests found
...@@ -71,9 +71,11 @@ static int sysfs_init_fs_context(struct fs_context *fc) ...@@ -71,9 +71,11 @@ static int sysfs_init_fs_context(struct fs_context *fc)
kfc->magic = SYSFS_MAGIC; kfc->magic = SYSFS_MAGIC;
fc->fs_private = kfc; fc->fs_private = kfc;
fc->ops = &sysfs_fs_context_ops; fc->ops = &sysfs_fs_context_ops;
if (fc->user_ns) if (netns) {
put_user_ns(fc->user_ns); if (fc->user_ns)
fc->user_ns = get_user_ns(netns->user_ns); put_user_ns(fc->user_ns);
fc->user_ns = get_user_ns(netns->user_ns);
}
fc->global = true; fc->global = true;
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment