- ipc-namespace-utils-compilation-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     ipc namespace: compilation fix

has been removed from the -mm tree.  Its filename is

     ipc-namespace-utils-compilation-fix.patch

This patch was dropped because it was folded into ipc-namespace-utils.patch

------------------------------------------------------
Subject: ipc namespace: compilation fix
From: Kirill Korotaev <dev@xxxxx>

Fix IPC namespace compilation when `make allnoconfig` is used.  Checked all
3 possible combinations of config options.

Cc: Pavel Emelianov <xemul@xxxxxxxxxx>
Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
Cc: Cedric Le Goater <clg@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/init_task.h |    3 ++-
 include/linux/ipc.h       |   18 ++++++++++++++++++
 ipc/util.c                |   15 ---------------
 kernel/fork.c             |   10 ++++++++++
 4 files changed, 30 insertions(+), 16 deletions(-)

diff -puN include/linux/init_task.h~ipc-namespace-utils-compilation-fix include/linux/init_task.h
--- a/include/linux/init_task.h~ipc-namespace-utils-compilation-fix
+++ a/include/linux/init_task.h
@@ -6,6 +6,7 @@
 #include <linux/irqflags.h>
 #include <linux/utsname.h>
 #include <linux/lockdep.h>
+#include <linux/ipc.h>
 
 #define INIT_FDTABLE \
 {							\
@@ -74,8 +75,8 @@ extern struct nsproxy init_nsproxy;
 	.count		= ATOMIC_INIT(1),				\
 	.nslock		= SPIN_LOCK_UNLOCKED,				\
 	.uts_ns		= &init_uts_ns,					\
-	.ipc_ns		= &init_ipc_ns,					\
 	.namespace	= NULL,						\
+	INIT_IPC_NS(ipc_ns)						\
 }
 
 #define INIT_SIGHAND(sighand) {						\
diff -puN include/linux/ipc.h~ipc-namespace-utils-compilation-fix include/linux/ipc.h
--- a/include/linux/ipc.h~ipc-namespace-utils-compilation-fix
+++ a/include/linux/ipc.h
@@ -88,20 +88,38 @@ struct ipc_namespace {
 };
 
 extern struct ipc_namespace init_ipc_ns;
+
+#ifdef CONFIG_SYSVIPC
+#define INIT_IPC_NS(ns)		.ns		= &init_ipc_ns,
+#else
+#define INIT_IPC_NS(ns)
+#endif
+
+#ifdef CONFIG_IPC_NS
 extern void free_ipc_ns(struct kref *kref);
 extern int copy_ipcs(unsigned long flags, struct task_struct *tsk);
 extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns);
+#else
+static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk)
+{
+	return 0;
+}
+#endif
 
 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
 {
+#ifdef CONFIG_IPC_NS
 	if (ns)
 		kref_get(&ns->kref);
+#endif
 	return ns;
 }
 
 static inline void put_ipc_ns(struct ipc_namespace *ns)
 {
+#ifdef CONFIG_IPC_NS
 	kref_put(&ns->kref, free_ipc_ns);
+#endif
 }
 
 #endif /* __KERNEL__ */
diff -puN ipc/util.c~ipc-namespace-utils-compilation-fix ipc/util.c
--- a/ipc/util.c~ipc-namespace-utils-compilation-fix
+++ a/ipc/util.c
@@ -144,21 +144,6 @@ void free_ipc_ns(struct kref *kref)
 	shm_exit_ns(ns);
 	kfree(ns);
 }
-#else
-int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns)
-{
-	return -EINVAL;
-}
-
-int copy_ipcs(unsigned long flags, struct task_struct *tsk)
-{
-	return 0;
-}
-
-void free_ipc_ns(struct kref *kref)
-{
-	BUG(); /* init_ipc_ns should never be put */
-}
 #endif
 
 /**
diff -puN kernel/fork.c~ipc-namespace-utils-compilation-fix kernel/fork.c
--- a/kernel/fork.c~ipc-namespace-utils-compilation-fix
+++ a/kernel/fork.c
@@ -1578,6 +1578,16 @@ static int unshare_semundo(unsigned long
 	return 0;
 }
 
+#ifndef CONFIG_IPC_NS
+static inline int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns)
+{
+	if (flags & CLONE_NEWIPC)
+		return -EINVAL;
+
+	return 0;
+}
+#endif
+
 /*
  * unshare allows a process to 'unshare' part of the process
  * context which was originally shared using clone.  copy_*
_

Patches currently in -mm which might be from dev@xxxxx are

origin.patch
ipc-namespace-utils.patch
ipc-namespace-utils-compilation-fix.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux