aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/root.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-09 09:57:27 -0400
committerArnd Bergmann <arnd@arndb.de>2013-04-09 10:02:14 -0400
commit71f6424023cb9fa381efc7237ca05926b2b1ca9a (patch)
tree6c3c4a2110d0ff3d73c4bacaddb23b9295663695 /fs/proc/root.c
parent9bc128e16bb82c046d6972171de572affc5c4cbf (diff)
parente933a1a12a02f42e0013cda87bba37ccb59efc47 (diff)
Merge branch 'mxs/cleanup' into next/multiplatform
This is a dependency for mxs/multiplatform Signed-off-by: Arnd Bergmann <arnd@arndb.de> Conflicts: drivers/clocksource/Makefile
Diffstat (limited to 'fs/proc/root.c')
-rw-r--r--fs/proc/root.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c
index c6e9fac26bac..9c7fab1d23f0 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -16,6 +16,7 @@
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/bitops.h> 18#include <linux/bitops.h>
19#include <linux/user_namespace.h>
19#include <linux/mount.h> 20#include <linux/mount.h>
20#include <linux/pid_namespace.h> 21#include <linux/pid_namespace.h>
21#include <linux/parser.h> 22#include <linux/parser.h>
@@ -108,6 +109,9 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
108 } else { 109 } else {
109 ns = task_active_pid_ns(current); 110 ns = task_active_pid_ns(current);
110 options = data; 111 options = data;
112
113 if (!current_user_ns()->may_mount_proc)
114 return ERR_PTR(-EPERM);
111 } 115 }
112 116
113 sb = sget(fs_type, proc_test_super, proc_set_super, flags, ns); 117 sb = sget(fs_type, proc_test_super, proc_set_super, flags, ns);