The patch titled ipcns: fix !CONFIG_IPC_NS behavior has been added to the -mm tree. Its filename is merge-sys_clone-sys_unshare-nsproxy-and-namespace-fix-fix.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ipcns: fix !CONFIG_IPC_NS behavior From: "Serge E. Hallyn" <serue@xxxxxxxxxx> When CONFIG_IPC_NS=n, clone(CLONE_NEWIPC) claims success, but did not actually clone a new IPC namespace. Fix this to return -EINVAL so the caller knows his request was denied. Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/ipc.h | 10 ++-------- ipc/util.c | 7 +++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff -puN include/linux/ipc.h~merge-sys_clone-sys_unshare-nsproxy-and-namespace-fix-fix include/linux/ipc.h --- a/include/linux/ipc.h~merge-sys_clone-sys_unshare-nsproxy-and-namespace-fix-fix +++ a/include/linux/ipc.h @@ -96,16 +96,10 @@ extern struct ipc_namespace init_ipc_ns; #define INIT_IPC_NS(ns) #endif -#ifdef CONFIG_IPC_NS -extern void free_ipc_ns(struct kref *kref); extern struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns); -#else -static inline struct ipc_namespace *copy_ipcs(unsigned long flags, - struct ipc_namespace *ns) -{ - return ns; -} +#ifdef CONFIG_IPC_NS +extern void free_ipc_ns(struct kref *kref); #endif static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) diff -puN ipc/util.c~merge-sys_clone-sys_unshare-nsproxy-and-namespace-fix-fix ipc/util.c --- a/ipc/util.c~merge-sys_clone-sys_unshare-nsproxy-and-namespace-fix-fix +++ a/ipc/util.c @@ -111,6 +111,13 @@ void free_ipc_ns(struct kref *kref) shm_exit_ns(ns); kfree(ns); } +#else +struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns) +{ + if (flags & CLONE_NEWIPC) + return ERR_PTR(-EINVAL); + return ns; +} #endif /** _ Patches currently in -mm which might be from serue@xxxxxxxxxx are utsns-fix-config_uts_ns-behavior.patch ipcns-fix-config_ipc_ns-behavior.patch implement-file-posix-capabilities.patch file-capabilities-accomodate-future-64-bit-caps.patch merge-sys_clone-sys_unshare-nsproxy-and-namespace.patch merge-sys_clone-sys_unshare-nsproxy-and-namespace-fix-fix.patch attach_pid-with-struct-pid-parameter.patch statically-initialize-struct-pid-for-swapper.patch explicitly-set-pgid-and-sid-of-init-process.patch use-struct-pid-parameter-in-copy_process.patch use-task_pgrp-task_session-in-copy_process.patch kill-unused-sesssion-and-group-values-in-rocket-driver.patch fix-some-coding-style-errors-in-autofs.patch replace-pid_t-in-autofs-with-struct-pid-reference.patch dont-init-pgrp-and-__session-in-init_signals.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html