From: "Serge E. Hallyn" Don't do user_ns permission checks when !CONFIG_USER_NS. Signed-off-by: Serge E. Hallyn Signed-off-by: Andrew Morton --- include/linux/sched.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff -puN include/linux/sched.h~user-ns-add-user_namespace-ptr-to-vfsmount-fixes include/linux/sched.h --- a/include/linux/sched.h~user-ns-add-user_namespace-ptr-to-vfsmount-fixes +++ a/include/linux/sched.h @@ -1598,6 +1598,7 @@ extern int cond_resched(void); extern int cond_resched_lock(spinlock_t * lock); extern int cond_resched_softirq(void); +#ifdef CONFIG_USER_NS /* * Check whether a task and a vfsmnt belong to the same uidns. * Since the initial namespace is exempt from these checks, @@ -1614,6 +1615,13 @@ static inline int task_mnt_same_uidns(st return 1; return 0; } +#else +static inline int task_mnt_same_uidns(struct task_struct *tsk, + struct vfsmount *mnt) +{ + return 1; +} +#endif /* _