[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6801255-238d-5c16-fe65-945de10952ce@nvidia.com>
Date: Fri, 30 Jun 2023 17:21:56 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Ryan Roberts <ryan.roberts@....com>,
Andrew Morton <akpm@...ux-foundation.org>
CC: LKML <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Al Viro <viro@...iv.linux.org.uk>,
Alex Williamson <alex.williamson@...hat.com>,
Alexander Potapenko <glider@...gle.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
"Christian Brauner" <brauner@...nel.org>,
Christoph Hellwig <hch@...radead.org>,
"Daniel Vetter" <daniel@...ll.ch>, Dave Airlie <airlied@...il.com>,
Dimitri Sivanich <dimitri.sivanich@....com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Ian Rogers <irogers@...gle.com>,
Jason Gunthorpe <jgg@...pe.ca>, Jiri Olsa <jolsa@...nel.org>,
Johannes Weiner <hannes@...xchg.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Lorenzo Stoakes <lstoakes@...il.com>,
Mark Rutland <mark.rutland@....com>,
Matthew Wilcox <willy@...radead.org>,
Miaohe Lin <linmiaohe@...wei.com>,
Michal Hocko <mhocko@...nel.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
Mike Rapoport <rppt@...nel.org>,
Muchun Song <muchun.song@...ux.dev>,
Namhyung Kim <namhyung@...nel.org>,
Naoya Horiguchi <naoya.horiguchi@....com>,
"Oleksandr Tyshchenko" <oleksandr_tyshchenko@...m.com>,
Pavel Tatashin <pasha.tatashin@...een.com>,
Roman Gushchin <roman.gushchin@...ux.dev>,
SeongJae Park <sj@...nel.org>,
Shakeel Butt <shakeelb@...gle.com>,
"Uladzislau Rezki" <urezki@...il.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
"Yu Zhao" <yuzhao@...gle.com>
Subject: Re: [PATCH] mm/hugetlb.c: fix a bug within a BUG(): inconsistent pte
comparison
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
Powered by blists - more mailing lists