[CRIU] [PATCH 09/22] parasite: Initialize @cmd/ack in init_thread

Pavel Emelyanov xemul at parallels.com
Wed May 15 09:12:40 EDT 2013


On 05/08/2013 05:28 PM, Andrey Vagin wrote:
> From: Cyrill Gorcunov <gorcunov at openvz.org>
> 
> To not fail if one day PARASITE_CMD_IDLE become
> non equal to zero.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  pie/parasite.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/pie/parasite.c b/pie/parasite.c
> index 972d9a5..2ce7616 100644
> --- a/pie/parasite.c
> +++ b/pie/parasite.c
> @@ -242,6 +242,9 @@ static int init_thread(struct parasite_init_args *args)
>  	tid_state[next_tid_state].tid = sys_gettid();
>  	tid_state[next_tid_state].real = args->real;
>  
> +	futex_set(&tid_state[next_tid_state].cmd, PARASITE_CMD_IDLE);
> +	futex_set(&tid_state[next_tid_state].ack, PARASITE_CMD_IDLE);
> +
>  	hash_thread_state(&tid_state[next_tid_state]);
>  
>  	next_tid_state++;
> 


Should be merged in ... presumably #8


More information about the CRIU mailing list