diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 21:01:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 21:01:10 +0200 |
commit | ef99f3aee9641d10a7c80d4803d2f0f004c797ca (patch) | |
tree | 83f14ccef66db48fc4178bd8b973462006de86b8 /fs/sysfs/mount.c | |
parent | ARM: PL011: Add support for Rx DMA buffer polling. (diff) | |
parent | Linux 3.9-rc5 (diff) | |
download | linux-ef99f3aee9641d10a7c80d4803d2f0f004c797ca.tar.xz linux-ef99f3aee9641d10a7c80d4803d2f0f004c797ca.zip |
Merge 3.9-rc5 into tty-next
We need the fixes here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 8d924b5ec733..afd83273e6ce 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -19,6 +19,7 @@ #include <linux/module.h> #include <linux/magic.h> #include <linux/slab.h> +#include <linux/user_namespace.h> #include "sysfs.h" @@ -111,6 +112,9 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type, struct super_block *sb; int error; + if (!(flags & MS_KERNMOUNT) && !current_user_ns()->may_mount_sysfs) + return ERR_PTR(-EPERM); + info = kzalloc(sizeof(*info), GFP_KERNEL); if (!info) return ERR_PTR(-ENOMEM); |