[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DF103E57-601C-4CBB-99CA-088E1C29F517@linux.dev>
Date: Fri, 23 May 2025 11:27:18 +0800
From: Muchun Song <muchun.song@...ux.dev>
To: Oscar Salvador <osalvador@...e.de>
Cc: Ge Yang <yangge1116@....com>,
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 May 23, 2025, at 03:32, Oscar Salvador <osalvador@...e.de> wrote:
>
> On Thu, May 22, 2025 at 08:39:39PM +0800, Muchun Song wrote:
>> But I think we could use "folio_order() > MAX_PAGE_ORDER" to replace the check
>> of hstate_is_gigantic(), right? Then ee could remove the first parameter of hstate
>> from alloc_and_dissolve_hugetlb_folio() and obtain hstate in it.
>
> Yes, I think we can do that.
> So something like the following (compily-tested only) maybe?
>
> From d7199339e905f83b54d22849e8f21f631916ce94 Mon Sep 17 00:00:00 2001
> From: Oscar Salvador <osalvador@...e.de>
> Date: Thu, 22 May 2025 19:51:04 +0200
> Subject: [PATCH] TMP
>
> ---
> mm/hugetlb.c | 38 +++++++++-----------------------------
> 1 file changed, 9 insertions(+), 29 deletions(-)
Pretty simple. The code LGTM.
Thanks.
Powered by blists - more mailing lists