* [PATCH] cr: don't try to collect or fetch ipc_ns
@ 2010-04-13 23:55 Serge E. Hallyn
0 siblings, 0 replies; only message in thread
From: Serge E. Hallyn @ 2010-04-13 23:55 UTC (permalink / raw)
To: Matt Helsley; +Cc: Linux Containers
This is just the completion of the patch i sent a few days
ago to prevent checkpoint_obj()ing the ipc_ns. With
CONFIG_SYSVIPC=n and CONFIG_POSIX_MQUEUE=n, and without
this patch, the pthread1 testcase fails. (The only reason
that one fails while the others succeed, i think is because
it uses 'nsexec -n', forcing a new net-ns and therefore
forcing a new nsproxy, which the other testcases do not
do).
Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
kernel/nsproxy.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 8f2d0b7..92c84b8 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -254,6 +254,7 @@ int ckpt_collect_ns(struct ckpt_ctx *ctx, struct task_struct *t)
if (ret < 0)
goto out;
#endif
+#ifdef CONFIG_IPC_NS
ret = ckpt_obj_collect(ctx, nsproxy->ipc_ns, CKPT_OBJ_IPC_NS);
if (ret < 0)
goto out;
@@ -266,6 +267,7 @@ int ckpt_collect_ns(struct ckpt_ctx *ctx, struct task_struct *t)
if (ret < 0)
goto out;
}
+#endif
ret = ckpt_obj_collect(ctx, nsproxy->mnt_ns, CKPT_OBJ_MNT_NS);
if (ret < 0)
@@ -353,8 +355,13 @@ static void *restore_ns(struct ckpt_ctx *ctx)
if (h->ipc_objref == 0)
ipc_ns = ctx->root_nsproxy->ipc_ns;
+#ifdef CONFIG_IPC_NS
else
ipc_ns = ckpt_obj_fetch(ctx, h->ipc_objref, CKPT_OBJ_IPC_NS);
+#else
+ else
+ ipc_ns = ERR_PTR(-EINVAL);
+#endif
if (IS_ERR(ipc_ns)) {
ret = PTR_ERR(ipc_ns);
goto out;
--
1.7.0.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-13 23:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-13 23:55 [PATCH] cr: don't try to collect or fetch ipc_ns Serge E. Hallyn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox