[CRIU] [PATCH] page-read: initialize parent to NULL
Andrew Vagin
avagin at parallels.com
Tue Mar 18 03:06:22 PDT 2014
On Tue, Mar 18, 2014 at 01:44:18PM +0400, Cyrill Gorcunov wrote:
> On Tue, Mar 18, 2014 at 01:30:08PM +0400, Andrey Vagin wrote:
> > For example restore_shmem_content allocates the page_read structure on
> > stack.
> >
> > Cc: Pavel Emelyanov <xemul at parallels.com>
> > Reported-by: Jenkins Criuovich
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
> > ---
> > page-read.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/page-read.c b/page-read.c
> > index 6ed1e6b..983e5c9 100644
> > --- a/page-read.c
> > +++ b/page-read.c
> > @@ -217,6 +217,7 @@ err_cl:
> > int open_page_read_at(int dfd, int pid, struct page_read *pr, int flags, bool shmem)
> > {
> > pr->pe = NULL;
> > + pr->parent = NULL;
> > pr->bunch.iov_len = 0;
> > pr->bunch.iov_base = NULL;
>
> Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>
>
> Btw, maybe we should use xzalloc in try_open_parent?
open_page_read_at gets it in arguments, so I don't want to think who and
how allocates it.
More information about the CRIU
mailing list