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 <[email protected]>
> ---
>  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
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to