[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aC8PRkyd3y74Ph5R@localhost.localdomain>
Date: Thu, 22 May 2025 13:49:26 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Ge Yang <yangge1116@....com>
Cc: Muchun Song <muchun.song@...ux.dev>, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, 21cnbao@...il.com, david@...hat.com,
baolin.wang@...ux.alibaba.com, liuzixing@...on.cn
Subject: Re: [PATCH] mm/hugetlb: fix kernel NULL pointer dereference when
replacing free hugetlb folios
On Thu, May 22, 2025 at 07:34:56PM +0800, Ge Yang wrote:
> It seems that we cannot simply remove the folio_test_hugetlb() check. The
> reasons are as follows:
Yeah, my thought was whether we could move the folio_hstate within
alloc_and_dissolve_hugetlb_folio(), since the latter really needs to take the
lock.
But isolate_or_dissolve_huge_page() also needs the 'hstate' not only to
pass it onto alloc_and_dissolve_hugetlb_folio() but to check whether
hstate is gigantic.
Umh, kinda hate sparkling the locks all around.
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists