[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220623142412.ooltag26kcbqy7am@revolver>
Date: Thu, 23 Jun 2022 14:24:27 +0000
From: Liam Howlett <liam.howlett@...cle.com>
To: Yang Yingliang <yangyingliang@...wei.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"quic_qiancai@...cinc.com" <quic_qiancai@...cinc.com>,
"yuzhao@...gle.com" <yuzhao@...gle.com>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH -next] mm/mmap: fix error return code in
do_mas_align_munmap()
I actually have the same patch sitting on my branch, reported by Dan. I
have been testing this code before sending it out.
Reviewed-by: Liam R. Howlett <Liam.Howlett@...cle.com>
* Yang Yingliang <yangyingliang@...wei.com> [220623 09:32]:
> Return error code when munmap_sidetree() fails in do_mas_align_munmap().
>
> Fixes: 81f5504dfb36 ("mm/mmap: change do_mas_align_munmap() to avoid preallocations for sidetree")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
> mm/mmap.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/mmap.c b/mm/mmap.c
> index 1bdf56804048..bb978061a790 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -2427,7 +2427,8 @@ do_mas_align_munmap(struct ma_state *mas, struct vm_area_struct *vma,
>
> mas_set(mas, end);
> split = mas_prev(mas, 0);
> - if (munmap_sidetree(split, &mas_detach))
> + error = munmap_sidetree(split, &mas_detach);
> + if (error)
> goto munmap_sidetree_failed;
>
> count++;
> @@ -2435,7 +2436,8 @@ do_mas_align_munmap(struct ma_state *mas, struct vm_area_struct *vma,
> vma = split;
> break;
> }
> - if (munmap_sidetree(next, &mas_detach))
> + error = munmap_sidetree(next, &mas_detach);
> + if (error)
> goto munmap_sidetree_failed;
>
> count++;
> --
> 2.25.1
>
Powered by blists - more mailing lists