[CRIU] [PATCH] page-read: initialize parent to NULL

Cyrill Gorcunov gorcunov at gmail.com
Tue Mar 18 02:44:18 PDT 2014


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?


More information about the CRIU mailing list