lkml.org 
[lkml]   [2007]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ipcns: fix stupid !CONFIG_IPC error
Sorry, I broke CONFIG_IPC=n.  This is a port of the patch Andrew
used to fix it in -mm

Here is a question... When CONFIG_IPC_NS=n and the user asks for
a new IPC namespace, we want to return -EINVAL to let them know
we couldn't oblige. But if CONFIG_IPC=n is it ok to just return 0?

If not, then we'll need a somewhat different fix, as we can't
#include sched.h in ipc.h.

thanks,
-serge

From: Serge E. Hallyn <serue@us.ibm.com>
Subject: [PATCH] ipcns: fix stupid !CONFIG_IPC error

Andrew Morton pointed out my patch to fix CLONE_NEWIPC behavior
when CONFIG_IPC_NS=n broke compilation when CONFIG_IPC=n.

Make sure copy_ipcs() is always defined.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>

---

include/linux/ipc.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

d731d029f908b76af52d2abd9ab199fa931d2c98
diff --git a/include/linux/ipc.h b/include/linux/ipc.h
index 5c05c88..6da6772 100644
--- a/include/linux/ipc.h
+++ b/include/linux/ipc.h
@@ -92,11 +92,13 @@ extern struct ipc_namespace init_ipc_ns;

#ifdef CONFIG_SYSVIPC
#define INIT_IPC_NS(ns) .ns = &init_ipc_ns,
+extern int copy_ipcs(unsigned long flags, struct task_struct *tsk);
#else
#define INIT_IPC_NS(ns)
+static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk)
+{ return 0; }
#endif

-extern int copy_ipcs(unsigned long flags, struct task_struct *tsk);
#ifdef CONFIG_IPC_NS
extern void free_ipc_ns(struct kref *kref);
extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns);
--
1.3.2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-27 05:39    [W:0.034 / U:1.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site