[CRIU] [PATCH 02/13] parasite: Rework init/fini to reserve/free space for per-thread data

Pavel Emelyanov xemul at parallels.com
Wed Nov 7 05:07:53 EST 2012


On 11/06/2012 08:53 PM, Cyrill Gorcunov wrote:
> 
> The per-thread information requires own space in parasite data.
> In particular we will keep the blocked signals bound to thread
> pids.
> 
> For this sake the caller need to provide the parasite how many
> threads will be used to calculate space.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  cr-dump.c                  |    2 +-
>  include/parasite-syscall.h |    1 +
>  include/parasite.h         |    3 +++
>  parasite-syscall.c         |    8 +++++---
>  parasite.c                 |   26 ++++++++++++++++++++++++++
>  5 files changed, 36 insertions(+), 4 deletions(-)
> 


> @@ -1529,7 +1529,7 @@ static int dump_one_task(struct pstree_item *item)
>  	}
>  
>  	ret = -1;
> -	parasite_ctl = parasite_infect_seized(pid, &vma_area_list);
> +	parasite_ctl = parasite_infect_seized(pid, item->nr_threads, &vma_area_list);
>  	if (!parasite_ctl) {
>  		pr_err("Can't infect (pid: %d) with parasite\n", pid);
>  		goto err;

You will fix this again in patch #8 to make it accept item. Do it now.



More information about the CRIU mailing list