[CRIU] Re: [PATCH cr 09/11] restore: restore content of private mappings before forking children

Pavel Emelyanov xemul at parallels.com
Mon Oct 15 12:32:34 EDT 2012


> +static int restore_anon_vma_content(pid_t pid)
> +{
> +	struct vma_area *vma;
> +	int fd, ret = 0;
> +
> +	vma = list_first_entry(&vma_list, struct vma_area, list);
> +
> +	fd = open_image_ro(CR_FD_PAGES, pid);
> +	if (fd < 0)
> +		return -1;
> +
> +	/*
> +	 * Read page contents.
> +	 */
> +	while (1) {
> +		u64 va;
> +		char buf[PAGE_SIZE];

Ugly as sin. Will we fix this thing?

> +		void *p;
> +



More information about the CRIU mailing list