From: "Serge E. Hallyn" When CONFIG_UTS_NS=n, clone(CLONE_NEWUTS) quietly refuses. So correctly does not unshare a new uts namespace, but also does not return -EINVAL. Fix this to return -EINVAL so the caller knows his request was denied. Signed-off-by: Serge E. Hallyn Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton --- include/linux/utsname.h | 2 ++ 1 file changed, 2 insertions(+) diff -puN include/linux/utsname.h~utsns-fix-config_uts_ns-behavior include/linux/utsname.h --- a/include/linux/utsname.h~utsns-fix-config_uts_ns-behavior +++ a/include/linux/utsname.h @@ -70,6 +70,8 @@ static inline int unshare_utsname(unsign static inline int copy_utsname(int flags, struct task_struct *tsk) { + if (flags & CLONE_NEWUTS) + return -EINVAL; return 0; } static inline void put_uts_ns(struct uts_namespace *ns) _