* [PATCH] Invert the NETNS checkpoint flag
@ 2010-04-02 13:34 Dan Smith
[not found] ` <1270215265-29081-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Dan Smith @ 2010-04-02 13:34 UTC (permalink / raw)
To: containers-qjLDD68F18O7TbgM5vRIOg
Change CHECKPOINT_NONETNS to CHECKPOINT_NETNS. This makes it the default
to ignore network namespaces and devices, unless specifically asked for
by the caller.
Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
include/linux/checkpoint.h | 4 ++--
kernel/nsproxy.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h
index 6da0a2e..96693e2 100644
--- a/include/linux/checkpoint.h
+++ b/include/linux/checkpoint.h
@@ -14,7 +14,7 @@
/* checkpoint user flags */
#define CHECKPOINT_SUBTREE 0x1
-#define CHECKPOINT_NONETNS 0x2
+#define CHECKPOINT_NETNS 0x2
/* restart user flags */
#define RESTART_TASKSELF 0x1
@@ -59,7 +59,7 @@ extern long do_sys_restart(pid_t pid, int fd,
/* ckpt_ctx: uflags */
#define CHECKPOINT_USER_FLAGS \
(CHECKPOINT_SUBTREE | \
- CHECKPOINT_NONETNS)
+ CHECKPOINT_NETNS)
#define RESTART_USER_FLAGS \
(RESTART_TASKSELF | \
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index c19f5fa..041fb09 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -249,7 +249,7 @@ int ckpt_collect_ns(struct ckpt_ctx *ctx, struct task_struct *t)
if (ret < 0)
goto out;
#ifdef CONFIG_NETNS_CHECKPOINT
- if (!(ctx->uflags & CHECKPOINT_NONETNS))
+ if (ctx->uflags & CHECKPOINT_NETNS)
ret = ckpt_obj_collect(ctx, nsproxy->net_ns, CKPT_OBJ_NET_NS);
if (ret < 0)
goto out;
@@ -295,7 +295,7 @@ static int do_checkpoint_ns(struct ckpt_ctx *ctx, struct nsproxy *nsproxy)
goto out;
h->ipc_objref = ret;
#ifdef CONFIG_NETNS_CHECKPOINT
- if (!(ctx->uflags & CHECKPOINT_NONETNS))
+ if (ctx->uflags & CHECKPOINT_NETNS)
ret = checkpoint_obj(ctx, nsproxy->net_ns, CKPT_OBJ_NET_NS);
else
ret = 0;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1270215265-29081-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] Invert the NETNS checkpoint flag [not found] ` <1270215265-29081-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> @ 2010-04-05 13:23 ` Serge E. Hallyn 2010-04-24 23:11 ` Oren Laadan 1 sibling, 0 replies; 3+ messages in thread From: Serge E. Hallyn @ 2010-04-05 13:23 UTC (permalink / raw) To: Dan Smith; +Cc: containers-qjLDD68F18O7TbgM5vRIOg Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org): > Change CHECKPOINT_NONETNS to CHECKPOINT_NETNS. This makes it the default > to ignore network namespaces and devices, unless specifically asked for > by the caller. > > Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> Acked-by: Serge Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> > --- > include/linux/checkpoint.h | 4 ++-- > kernel/nsproxy.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h > index 6da0a2e..96693e2 100644 > --- a/include/linux/checkpoint.h > +++ b/include/linux/checkpoint.h > @@ -14,7 +14,7 @@ > > /* checkpoint user flags */ > #define CHECKPOINT_SUBTREE 0x1 > -#define CHECKPOINT_NONETNS 0x2 > +#define CHECKPOINT_NETNS 0x2 > > /* restart user flags */ > #define RESTART_TASKSELF 0x1 > @@ -59,7 +59,7 @@ extern long do_sys_restart(pid_t pid, int fd, > /* ckpt_ctx: uflags */ > #define CHECKPOINT_USER_FLAGS \ > (CHECKPOINT_SUBTREE | \ > - CHECKPOINT_NONETNS) > + CHECKPOINT_NETNS) > > #define RESTART_USER_FLAGS \ > (RESTART_TASKSELF | \ > diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c > index c19f5fa..041fb09 100644 > --- a/kernel/nsproxy.c > +++ b/kernel/nsproxy.c > @@ -249,7 +249,7 @@ int ckpt_collect_ns(struct ckpt_ctx *ctx, struct task_struct *t) > if (ret < 0) > goto out; > #ifdef CONFIG_NETNS_CHECKPOINT > - if (!(ctx->uflags & CHECKPOINT_NONETNS)) > + if (ctx->uflags & CHECKPOINT_NETNS) > ret = ckpt_obj_collect(ctx, nsproxy->net_ns, CKPT_OBJ_NET_NS); > if (ret < 0) > goto out; > @@ -295,7 +295,7 @@ static int do_checkpoint_ns(struct ckpt_ctx *ctx, struct nsproxy *nsproxy) > goto out; > h->ipc_objref = ret; > #ifdef CONFIG_NETNS_CHECKPOINT > - if (!(ctx->uflags & CHECKPOINT_NONETNS)) > + if (ctx->uflags & CHECKPOINT_NETNS) > ret = checkpoint_obj(ctx, nsproxy->net_ns, CKPT_OBJ_NET_NS); > else > ret = 0; > -- > 1.6.2.5 > > _______________________________________________ > Containers mailing list > Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org > https://lists.linux-foundation.org/mailman/listinfo/containers ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Invert the NETNS checkpoint flag [not found] ` <1270215265-29081-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 2010-04-05 13:23 ` Serge E. Hallyn @ 2010-04-24 23:11 ` Oren Laadan 1 sibling, 0 replies; 3+ messages in thread From: Oren Laadan @ 2010-04-24 23:11 UTC (permalink / raw) To: Dan Smith; +Cc: containers-qjLDD68F18O7TbgM5vRIOg Applied for ckpt-v21-rc3. Dan Smith wrote: > Change CHECKPOINT_NONETNS to CHECKPOINT_NETNS. This makes it the default > to ignore network namespaces and devices, unless specifically asked for > by the caller. > > Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> > --- > include/linux/checkpoint.h | 4 ++-- > kernel/nsproxy.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h > index 6da0a2e..96693e2 100644 > --- a/include/linux/checkpoint.h > +++ b/include/linux/checkpoint.h > @@ -14,7 +14,7 @@ > > /* checkpoint user flags */ > #define CHECKPOINT_SUBTREE 0x1 > -#define CHECKPOINT_NONETNS 0x2 > +#define CHECKPOINT_NETNS 0x2 > > /* restart user flags */ > #define RESTART_TASKSELF 0x1 > @@ -59,7 +59,7 @@ extern long do_sys_restart(pid_t pid, int fd, > /* ckpt_ctx: uflags */ > #define CHECKPOINT_USER_FLAGS \ > (CHECKPOINT_SUBTREE | \ > - CHECKPOINT_NONETNS) > + CHECKPOINT_NETNS) > > #define RESTART_USER_FLAGS \ > (RESTART_TASKSELF | \ > diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c > index c19f5fa..041fb09 100644 > --- a/kernel/nsproxy.c > +++ b/kernel/nsproxy.c > @@ -249,7 +249,7 @@ int ckpt_collect_ns(struct ckpt_ctx *ctx, struct task_struct *t) > if (ret < 0) > goto out; > #ifdef CONFIG_NETNS_CHECKPOINT > - if (!(ctx->uflags & CHECKPOINT_NONETNS)) > + if (ctx->uflags & CHECKPOINT_NETNS) > ret = ckpt_obj_collect(ctx, nsproxy->net_ns, CKPT_OBJ_NET_NS); > if (ret < 0) > goto out; > @@ -295,7 +295,7 @@ static int do_checkpoint_ns(struct ckpt_ctx *ctx, struct nsproxy *nsproxy) > goto out; > h->ipc_objref = ret; > #ifdef CONFIG_NETNS_CHECKPOINT > - if (!(ctx->uflags & CHECKPOINT_NONETNS)) > + if (ctx->uflags & CHECKPOINT_NETNS) > ret = checkpoint_obj(ctx, nsproxy->net_ns, CKPT_OBJ_NET_NS); > else > ret = 0; ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-24 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 13:34 [PATCH] Invert the NETNS checkpoint flag Dan Smith
[not found] ` <1270215265-29081-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-05 13:23 ` Serge E. Hallyn
2010-04-24 23:11 ` Oren Laadan
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.