[Devel] Re: [PATCH 1/3] Set the CHECKPOINTED flag on objects before calling checkpoint
Oren Laadan
orenl at librato.com
Mon Aug 24 22:53:43 PDT 2009
Right, added.
Dan Smith wrote:
> This helps prevent infinite recursion where the checkpoint() operation on an
> object could potentially result in another checkpoint() of itself.
>
> UNIX sockets would easily encounter this when we call checkpoint on all
> related sockets, which would in turn try to checkpoint us again.
>
>
> Signed-off-by: Dan Smith <danms at us.ibm.com>
> ---
> checkpoint/objhash.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/checkpoint/objhash.c b/checkpoint/objhash.c
> index dc0a10a..019077b 100644
> --- a/checkpoint/objhash.c
> +++ b/checkpoint/objhash.c
> @@ -677,9 +677,8 @@ int checkpoint_obj(struct ckpt_ctx *ctx, void *ptr, enum obj_type type)
>
> /* invoke callback to actually dump the state */
> BUG_ON(!obj->ops->checkpoint);
> - ret = obj->ops->checkpoint(ctx, ptr);
> -
> obj->flags |= CKPT_OBJ_CHECKPOINTED;
> + ret = obj->ops->checkpoint(ctx, ptr);
> }
>
> obj->flags |= CKPT_OBJ_VISITED;
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list