[CRIU] [PATCH] dump: set pid->state for threads

Andrei Vagin avagin at virtuozzo.com
Tue Jul 25 01:36:45 MSK 2017


Applied
On Tue, Jul 18, 2017 at 12:57:09AM +0300, Andrei Vagin wrote:
> From: Andrei Vagin <avagin at virtuozzo.com>
> 
> It is cheched in dead_pid_conflict, otherwise criu may segfault:
> 
> Program terminated with signal 11, Segmentation fault.
> 1073				if (item->pid->real == item->threads[i].real ||
> (gdb) p item
> $1 = (struct pstree_item *) 0x0
> (gdb) bt
> 
> Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
> ---
>  criu/seize.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/criu/seize.c b/criu/seize.c
> index 8d3c6cc..4abc159 100644
> --- a/criu/seize.c
> +++ b/criu/seize.c
> @@ -741,6 +741,7 @@ static int collect_threads(struct pstree_item *item)
>  		item->threads[id]->real = pid;
>  		item->threads[id]->item = NULL;
>  		item->threads[id]->level = level;
> +		item->threads[id]->state = TASK_THREAD;
>  		for (j = 0; j < level; j++)
>  			item->threads[id]->ns[j].virt = -1;
>  
> -- 
> 2.9.4
> 


More information about the CRIU mailing list