diff options
-rw-r--r-- | include/linux/ipc.h | 9 | ||||
-rw-r--r-- | ipc/util.c | 7 |
2 files changed, 10 insertions, 6 deletions
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index 636094c29b16..6da6772c19ff 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
@@ -92,19 +92,16 @@ extern struct ipc_namespace init_ipc_ns; | |||
92 | 92 | ||
93 | #ifdef CONFIG_SYSVIPC | 93 | #ifdef CONFIG_SYSVIPC |
94 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | 94 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, |
95 | extern int copy_ipcs(unsigned long flags, struct task_struct *tsk); | ||
95 | #else | 96 | #else |
96 | #define INIT_IPC_NS(ns) | 97 | #define INIT_IPC_NS(ns) |
98 | static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk) | ||
99 | { return 0; } | ||
97 | #endif | 100 | #endif |
98 | 101 | ||
99 | #ifdef CONFIG_IPC_NS | 102 | #ifdef CONFIG_IPC_NS |
100 | extern void free_ipc_ns(struct kref *kref); | 103 | extern void free_ipc_ns(struct kref *kref); |
101 | extern int copy_ipcs(unsigned long flags, struct task_struct *tsk); | ||
102 | extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns); | 104 | extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns); |
103 | #else | ||
104 | static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk) | ||
105 | { | ||
106 | return 0; | ||
107 | } | ||
108 | #endif | 105 | #endif |
109 | 106 | ||
110 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 107 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
diff --git a/ipc/util.c b/ipc/util.c index 08a647965b9e..0b652387d169 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -144,6 +144,13 @@ void free_ipc_ns(struct kref *kref) | |||
144 | shm_exit_ns(ns); | 144 | shm_exit_ns(ns); |
145 | kfree(ns); | 145 | kfree(ns); |
146 | } | 146 | } |
147 | #else | ||
148 | int copy_ipcs(unsigned long flags, struct task_struct *tsk) | ||
149 | { | ||
150 | if (flags & CLONE_NEWIPC) | ||
151 | return -EINVAL; | ||
152 | return 0; | ||
153 | } | ||
147 | #endif | 154 | #endif |
148 | 155 | ||
149 | /** | 156 | /** |