From: Xiu Jianfeng <xiujianfeng@huaweicloud.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Xiu Jianfeng <xiujianfeng@huaweicloud.com>
Cc: Liam.Howlett@oracle.com, willy@infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: remove duplicated vma->vm_flags check when expanding stack
Date: Mon, 11 Sep 2023 10:04:43 +0800 [thread overview]
Message-ID: <853d7e18-f264-7b1d-b5f5-1b11c2eba8a2@huaweicloud.com> (raw)
In-Reply-To: <20230910142627.0dce42578bfaab7c4c67e316@linux-foundation.org>
Hi,
On 2023/9/11 5:26, Andrew Morton wrote:
> On Wed, 6 Sep 2023 10:33:12 +0000 Xiu Jianfeng <xiujianfeng@huaweicloud.com> wrote:
>
>> expand_upwards() and expand_downwards() will return -EFAULT if VM_GROWSUP
>> or VM_GROWSDOWN is not correctly set in vma->vm_flags, however in
>> !CONFIG_STACK_GROWSUP case, expand_stack_locked() returns -EINVAL first
>> if !(vma->vm_flags & VM_GROWSDOWN) before calling expand_downwards(), to
>> keep the consistency with CONFIG_STACK_GROWSUP case, remove this check.
>
> What are the user-visible effects of this change?
>
> Do you believe this fix should be backported into earlier kernel versions?
The usages of this function are as bellow:
A:fs/exec.c
ret = expand_stack_locked(vma, stack_base);
if (ret)
ret = -EFAULT;
or
B:mm/memory.c mm/mmap.c
if (expand_stack_locked(vma, addr))
return NULL;
which means the return value will not propagate to other places, so I
believe there is no user-visible effects of this change, and it's
unnecessary to backport to earlier versions.
prev parent reply other threads:[~2023-09-11 2:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230906103312.645712-1-xiujianfeng@huaweicloud.com>
2023-09-10 21:26 ` Andrew Morton
2023-09-11 2:04 ` Xiu Jianfeng [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=853d7e18-f264-7b1d-b5f5-1b11c2eba8a2@huaweicloud.com \
--to=xiujianfeng@huaweicloud.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
/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