[CRIU] Re: [PATCH cr 04/11] restore: collect vma-s before creating
children
Andrew Vagin
avagin at parallels.com
Mon Oct 15 13:57:20 EDT 2012
On Mon, Oct 15, 2012 at 08:20:24PM +0400, Pavel Emelyanov wrote:
> > @@ -170,15 +173,18 @@ err:
> > return ret;
> > }
> >
> > -static int read_vmas(int pid, struct list_head *vmas, int *nr_vmas)
> > +static int read_vmas(int pid)
> > {
> > - int fd, ret = -1;
> > + int fd, ret = 0;
> > +
> > + INIT_LIST_HEAD(&vma_list);
>
> Isn't it init-ed already?
It can contain old vmas, which remain from a parent.
>
> >
> > + /* Skip errors, because a zombie doesn't have an image of vmas */
> > fd = open_image_ro(CR_FD_VMAS, pid);
> > if (fd < 0)
> > - return fd;
> > + return ret;
> >
> > - *nr_vmas = 0;
> > + nr_vmas = 0;
> > while (1) {
> > struct vma_area *vma;
> > VmaEntry *e;
More information about the CRIU
mailing list