> + err = cpt_write_head(ctx);
> +
> + /* Dump task here */
> + if (!err)
> + err = -ENOSYS;
> +
> +out:
> + ctx->nsproxy = NULL;
> + put_task_struct(root);
> + return err;
> +}
> diff --git a/cpt/cpt.h b/cpt/cpt.h
> index 607ac1b..b421a11 100644
> --- a/cpt/cpt.h
> +++ b/cpt/cpt.h
> @@ -33,6 +33,7 @@ typedef struct cpt_context
> int refcount;
> int ctx_state;
> struct semaphore main_sem;
> + struct nsproxy *nsproxy;
>
> int errno;
>
> @@ -54,3 +55,5 @@ extern int debug_level;
>
> #define eprintk(a...) cpt_printk(1, "CPT ERR: " a)
> #define dprintk(a...) cpt_printk(1, "CPT DBG: " a)
> +
> +int dump_container(struct cpt_context *ctx);
> diff --git a/cpt/sys.c b/cpt/sys.c
> index 8334c4c..6801c22 100644
> --- a/cpt/sys.c
> +++ b/cpt/sys.c
> @@ -109,9 +109,10 @@ static int checkpoint(pid_t pid, int fd, unsigned long flags)
>
> ctx->file = file;
> ctx->ctx_state = CPT_CTX_DUMPING;
> + ctx->pid = pid;
>
> /* checkpoint */
> - err = -ENOSYS;
> + err = dump_container(ctx);
>
> context_put(ctx);
>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index 52b5037..f38b43d 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -77,6 +77,7 @@ int max_threads; /* tunable limit on nr_threads */
> DEFINE_PER_CPU(unsigned long, process_counts) = 0;
>
> __cacheline_aligned DEFINE_RWLOCK(tasklist_lock); /* outer */
> +EXPORT_SYMBOL(tasklist_lock);
>
> int nr_processes(void)
> {
> @@ -153,6 +154,7 @@ void __put_task_struct(struct task_struct *tsk)
> if (!profile_handoff_task(tsk))
> free_task(tsk);
> }
> +EXPORT_SYMBOL(__put_task_struct);
>
> /*
> * macro override instead of weak attribute alias, to workaround
> --
> 1.5.6
>
> _______________________________________________
> Containers mailing list
>
Containers@lists.linux-foundation.org
>
https://lists.linux-foundation.org/mailman/listinfo/containers