[Devel] Re: [PATCH 01/11] checkpoint: fix leak in VMA restore error path

Matt Helsley matthltc at us.ibm.com
Thu Oct 21 17:18:19 PDT 2010


On Wed, Oct 20, 2010 at 01:56:36PM -0500, Nathan Lynch wrote:
> If the vma record contains unsupported flags restore_vma() returns
> -ENOSYS without releasing the record.
> 
> Signed-off-by: Nathan Lynch <ntl at pobox.com>

Reviewed-by: Matt Helsley <matthltc at us.ibm.com>

> ---
>  mm/checkpoint.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/checkpoint.c b/mm/checkpoint.c
> index 70300e8..00cbadd 100644
> --- a/mm/checkpoint.c
> +++ b/mm/checkpoint.c
> @@ -1209,8 +1209,9 @@ static int restore_vma(struct ckpt_ctx *ctx, struct mm_struct *mm)
>  		goto out;
>  	if (h->vma_type >= CKPT_VMA_MAX)
>  		goto out;
> +	ret = -ENOSYS;
>  	if (h->vm_flags & CKPT_VMA_NOT_SUPPORTED)
> -		return -ENOSYS;
> +		goto out;
> 
>  	ops = &restore_vma_ops[h->vma_type];
> 
> -- 
> 1.7.2.2
> 
> _______________________________________________
> Containers mailing list
> Containers at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list