From: "Екатерина Есина" <eesina@astralinux.ru>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH mm v2] mm: hugetlb: Add checks for NULL for vma returned from find_vma.
Date: Tue, 17 Jan 2023 10:57:22 +0300 (MSK) [thread overview]
Message-ID: <1573070216.376764389.1673942242274.JavaMail.zimbra@astralinux.ru> (raw)
In-Reply-To: <Y8WXsOaR+pclaUNp@monkey>
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]
The patch can be applied up to 5.12 version and in 5.13 the logic of the function huge_pmd_share changes. And in later versions vma is passed as a function argument.
Best regards,
Ekaterina Esina
-----Original Message-----
From: Mike <mike.kravetz@oracle.com>
To: Esina <eesina@astralinux.ru>
Cc: Andrew <akpm@linux-foundation.org>; linux-mm <linux-mm@kvack.org>; linux-kernel <linux-kernel@vger.kernel.org>; lvc-project <lvc-project@linuxtesting.org>
Date: Monday, 16 January 2023 9:30 PM MSK
Subject: Re: [PATCH mm v2] mm: hugetlb: Add checks for NULL for vma returned from find_vma.
On 01/16/23 13:39, Esina Ekaterina wrote:
> find_vma may return NULL, that's why its return value
> is usually checked for NULL. vma should be checked before dereferencing
>
> Found by Astra Linux on behalf of Linux Verification Center
> (linuxtesting.org) with SVACE.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Esina Ekaterina <eesina@astralinux.ru>
> ---
> mm/hugetlb.c | 32 ++++++++++++++++++--------------
> 1 file changed, 18 insertions(+), 14 deletions(-)
This is not the latest version of the code. What version are you
targeting?
I would claim that find_vma() can not return NULL in previous versions
of the code which this patch seems to target. Why? This routine is
called with mmap sema held and we know addr is part of the vma.
--
Mike Kravetz
[-- Attachment #2: Type: text/html, Size: 2162 bytes --]
prev parent reply other threads:[~2023-01-17 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230116103947.73153-1-eesina@astralinux.ru>
2023-01-16 18:30 ` Mike Kravetz
2023-01-17 7:57 ` Екатерина Есина [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=1573070216.376764389.1673942242274.JavaMail.zimbra@astralinux.ru \
--to=eesina@astralinux.ru \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lvc-project@linuxtesting.org \
--cc=mike.kravetz@oracle.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