[CRIU] Re: [PATCH] proc: Fix parsing of stack string

Pavel Emelyanov xemul at parallels.com
Wed Apr 25 16:47:04 EDT 2012


On 04/25/2012 10:28 PM, Cyrill Gorcunov wrote:
> Kernel 3.4-rc4 has two formats for stack
> "[stack]" and "[stack:%d]" (for threads)
> so adopt our parsing routine for both.

I think it worth adding a check, that we've found the "crucial" set of VMAs
in /proc. Stack is a must, how about vdso?

> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  proc_parse.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/proc_parse.c b/proc_parse.c
> index 2ba72d6..cd1e7d6 100644
> --- a/proc_parse.c
> +++ b/proc_parse.c
> @@ -97,7 +97,7 @@ int parse_maps(pid_t pid, struct list_head *vma_area_list, bool use_map_files)
>  			goto err;
>  		}
>  
> -		if (strstr(big_buffer, "[stack]")) {
> +		if (strstr(big_buffer, "[stack")) {
>  			vma_area->vma.status |= VMA_AREA_REGULAR | VMA_AREA_STACK;
>  			vma_area->vma.flags  |= MAP_GROWSDOWN;
>  		} else if (strstr(big_buffer, "[vsyscall]")) {



More information about the CRIU mailing list