From: Mike Kravetz <mike.kravetz@oracle.com>
To: Esina Ekaterina <eesina@astralinux.ru>
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: Mon, 16 Jan 2023 10:30:08 -0800 [thread overview]
Message-ID: <Y8WXsOaR+pclaUNp@monkey> (raw)
In-Reply-To: <20230116103947.73153-1-eesina@astralinux.ru>
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
next parent reply other threads:[~2023-01-16 18:30 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 [this message]
2023-01-17 7:57 ` Екатерина Есина
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=Y8WXsOaR+pclaUNp@monkey \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=eesina@astralinux.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lvc-project@linuxtesting.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