[CRIU] Re: [PATCH 5/5] pstree: Don't stack children with root task session in helpers

Andrey Vagin avagin at parallels.com
Wed Oct 3 06:49:41 EDT 2012


On Wed, Oct 03, 2012 at 12:57:33PM +0400, Cyrill Gorcunov wrote:
> 
> There is no need to move children which sid is the same as
> root task's sid to the helper task's list.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  pstree.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 

> diff --git a/pstree.c b/pstree.c
> index 677c45e..6e91eff 100644
> --- a/pstree.c
> +++ b/pstree.c
> @@ -253,7 +253,7 @@ int prepare_pstree_ids(void)
>  		list_for_each_entry_safe_continue(child, tmp, &root_item->children, list) {
>  			if (child->sid != helper->sid)
>  				continue;

^^^^^^^^^^^^^^^^^^^^^^^^^^^ the first condition
> -			if (child->sid == child->pid.virt)
> +			if (child->sid == root_item->sid || child->sid == child->pid.virt)

helper->sid could not be root_item->sid, so all children with
root_item->sid will be skipped on the first condition
>  				continue;
>  
>  			pr_info("Attach %d to the temporary task %d\n",



More information about the CRIU mailing list