From: Matthew Wilcox <willy@infradead.org>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Michal Hocko <mhocko@kernel.org>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
stable@kernel.org
Subject: Re: [PATCH] hugetlb: fix pages per hugetlb calculation
Date: Mon, 29 Jun 2020 19:54:34 +0100 [thread overview]
Message-ID: <20200629185434.GI25523@casper.infradead.org> (raw)
In-Reply-To: <20200629185003.97202-1-mike.kravetz@oracle.com>
On Mon, Jun 29, 2020 at 11:50:03AM -0700, Mike Kravetz wrote:
> The routine hpage_nr_pages() was incorrectly used to calculate the
> number of base pages in a hugetlb page. hpage_nr_pages is designed
> to be called for THP pages and will return HPAGE_PMD_NR for hugetlb
> pages of any size.
>
> Due to the context in which hpage_nr_pages was called, it is unlikely
> to produce a user visible error. The routine with the incorrect call
> is only exercised in the case of hugetlb memory error or migration.
> In addition, this would need to be on an architecture which supports
> huge page sizes less than PMD_SIZE. And, the vma containing the huge
> page would also need to smaller than PMD_SIZE.
>
> Fixes: c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization")
> Cc: stable@kernel.org
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Inadvertently-Reported-by: Matthew Wilcox (Oracle) <willy@infradead.org>
prev parent reply other threads:[~2020-06-29 18:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 18:50 Mike Kravetz
2020-06-29 18:54 ` Matthew Wilcox [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=20200629185434.GI25523@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=stable@kernel.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