From: Cedric Le Goater If the kernel is not configured with the CONFIG_UTS_NS, unshare of ipc namespace will fail and return -EINVAL. The patch changes the dummy unshare_utsname() to check the clone flags before returning. Signed-off-by: Cedric Le Goater Cc: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton --- include/linux/utsname.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff -puN include/linux/utsname.h~namespaces-utsname-implement-clone_newuts-flag-fix include/linux/utsname.h --- a/include/linux/utsname.h~namespaces-utsname-implement-clone_newuts-flag-fix +++ a/include/linux/utsname.h @@ -60,8 +60,12 @@ static inline void put_uts_ns(struct uts static inline int unshare_utsname(unsigned long unshare_flags, struct uts_namespace **new_uts) { - return -EINVAL; + if (unshare_flags & CLONE_NEWUTS) + return -EINVAL; + + return 0; } + static inline int copy_utsname(int flags, struct task_struct *tsk) { return 0; _