From: Liam Howlett <liam.howlett@oracle.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"quic_qiancai@quicinc.com" <quic_qiancai@quicinc.com>,
"yuzhao@google.com" <yuzhao@google.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH -next] mm/mmap: fix error return code in do_mas_align_munmap()
Date: Thu, 23 Jun 2022 14:24:27 +0000 [thread overview]
Message-ID: <20220623142412.ooltag26kcbqy7am@revolver> (raw)
In-Reply-To: <20220623134237.2127440-1-yangyingliang@huawei.com>
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@oracle.com>
* Yang Yingliang <yangyingliang@huawei.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@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.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
>
prev parent reply other threads:[~2022-06-23 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 13:42 Yang Yingliang
2022-06-23 14:24 ` Liam Howlett [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220623142412.ooltag26kcbqy7am@revolver \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=quic_qiancai@quicinc.com \
--cc=yangyingliang@huawei.com \
--cc=yuzhao@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox