lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDRnE8B27VgCoJ3N@localhost.localdomain>
Date: Mon, 26 May 2025 15:05:23 +0200
From: Oscar Salvador <osalvador@...e.de>
To: David Hildenbrand <david@...hat.com>
Cc: yangge1116@....com, akpm@...ux-foundation.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, 21cnbao@...il.com,
	baolin.wang@...ux.alibaba.com, muchun.song@...ux.dev,
	liuzixing@...on.cn
Subject: Re: [PATCH] mm/hugetlb: remove redundant folio_test_hugetlb

On Mon, May 26, 2025 at 02:23:58PM +0200, David Hildenbrand wrote:
> Already in 6.15, gah.
> 
> Please convert that code to never ever take any hugeglb locks unless we are
> clearly dealing with a hugetlb folios.

I guess we could just do?

 diff --git a/mm/hugetlb.c b/mm/hugetlb.c
 index 20f08de9e37d..8bd8b950e4cb 100644
 --- a/mm/hugetlb.c
 +++ b/mm/hugetlb.c
 @@ -2911,7 +2914,7 @@ int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long end_pfn)
  	while (start_pfn < end_pfn) {
  		folio = pfn_folio(start_pfn);
 
 -		if (!folio_ref_count(folio)) {
 +		if (!folio_ref_count(folio) && folio_test_hugetlb(folio)) {
  			ret = alloc_and_dissolve_hugetlb_folio(folio,
  							       &isolate_list);
  			if (ret)
 
 

-- 
Oscar Salvador
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ