From: John Hubbard <jhubbard@nvidia.com>
To: Ryan Roberts <ryan.roberts@arm.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Alex Williamson <alex.williamson@redhat.com>,
Alexander Potapenko <glider@google.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
"Christian Brauner" <brauner@kernel.org>,
Christoph Hellwig <hch@infradead.org>,
"Daniel Vetter" <daniel@ffwll.ch>,
Dave Airlie <airlied@gmail.com>,
Dimitri Sivanich <dimitri.sivanich@hpe.com>,
Dmitry Vyukov <dvyukov@google.com>,
Ian Rogers <irogers@google.com>, Jason Gunthorpe <jgg@ziepe.ca>,
Jiri Olsa <jolsa@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Lorenzo Stoakes <lstoakes@gmail.com>,
Mark Rutland <mark.rutland@arm.com>,
Matthew Wilcox <willy@infradead.org>,
Miaohe Lin <linmiaohe@huawei.com>,
Michal Hocko <mhocko@kernel.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
Mike Rapoport <rppt@kernel.org>,
Muchun Song <muchun.song@linux.dev>,
Namhyung Kim <namhyung@kernel.org>,
Naoya Horiguchi <naoya.horiguchi@nec.com>,
"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>,
Pavel Tatashin <pasha.tatashin@soleen.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
SeongJae Park <sj@kernel.org>, Shakeel Butt <shakeelb@google.com>,
"Uladzislau Rezki" <urezki@gmail.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
"Yu Zhao" <yuzhao@google.com>
Subject: Re: [PATCH] mm/hugetlb.c: fix a bug within a BUG(): inconsistent pte comparison
Date: Fri, 30 Jun 2023 17:21:56 -0700 [thread overview]
Message-ID: <e6801255-238d-5c16-fe65-945de10952ce@nvidia.com> (raw)
In-Reply-To: <05ea6668-3dca-23ed-56c8-bbf8079d93cd@arm.com>
On 6/30/23 03:07, Ryan Roberts wrote:
...
>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>> index bce28cca73a1..73fbeb8f979f 100644
>> --- a/mm/hugetlb.c
>> +++ b/mm/hugetlb.c
>> @@ -7246,7 +7246,12 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
>> pte = (pte_t *)pmd_alloc(mm, pud, addr);
>> }
>> }
>> - BUG_ON(pte && pte_present(ptep_get(pte)) && !pte_huge(ptep_get(pte)));
>> +
>> + if (pte) {
>> + pte_t pteval = ptep_get(pte);
>
> Given the PTL is not held here, I think this should technically be
> ptep_get_lockless()?
>
Oh yes. I'll change it to that and send a v2, thanks!
thanks,
--
John Hubbard
NVIDIA
next prev parent reply other threads:[~2023-07-01 0:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 1:32 John Hubbard
2023-06-30 1:50 ` James Houghton
2023-06-30 2:06 ` John Hubbard
2023-06-30 2:13 ` Muchun Song
2023-06-30 10:07 ` Ryan Roberts
2023-07-01 0:21 ` John Hubbard [this message]
2023-07-03 21:39 ` Mike Kravetz
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=e6801255-238d-5c16-fe65-945de10952ce@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=adrian.hunter@intel.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alex.williamson@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andreyknvl@gmail.com \
--cc=brauner@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dimitri.sivanich@hpe.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=hannes@cmpxchg.org \
--cc=hch@infradead.org \
--cc=irogers@google.com \
--cc=jgg@ziepe.ca \
--cc=jolsa@kernel.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=mark.rutland@arm.com \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=muchun.song@linux.dev \
--cc=namhyung@kernel.org \
--cc=naoya.horiguchi@nec.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=pasha.tatashin@soleen.com \
--cc=roman.gushchin@linux.dev \
--cc=rppt@kernel.org \
--cc=ryabinin.a.a@gmail.com \
--cc=ryan.roberts@arm.com \
--cc=shakeelb@google.com \
--cc=sj@kernel.org \
--cc=urezki@gmail.com \
--cc=vincenzo.frascino@arm.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--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