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: <02c0a4d9ea3f0470e2af485296b6ff4f1f4a87e3.1739941374.git-series.apopple@nvidia.com>
Date: Wed, 19 Feb 2025 16:04:52 +1100
From: Alistair Popple <apopple@...dia.com>
To: akpm@...ux-foundation.org,
	linux-mm@...ck.org
Cc: Alistair Popple <apopple@...dia.com>,
	gerald.schaefer@...ux.ibm.com,
	dan.j.williams@...el.com,
	jgg@...pe.ca,
	willy@...radead.org,
	david@...hat.com,
	linux-kernel@...r.kernel.org,
	nvdimm@...ts.linux.dev,
	linux-fsdevel@...r.kernel.org,
	linux-ext4@...r.kernel.org,
	linux-xfs@...r.kernel.org,
	jhubbard@...dia.com,
	hch@....de,
	zhang.lyra@...il.com,
	debug@...osinc.com,
	bjorn@...nel.org,
	balbirs@...dia.com
Subject: [PATCH RFC v2 08/12] mm/khugepaged: Remove redundant pmd_devmap() check

The only users of pmd_devmap were device dax and fs dax. The check for
pmd_devmap() in check_pmd_state() is therefore redundant as callers
explicitly check for is_zone_device_page(), so this check can be dropped.

Signed-off-by: Alistair Popple <apopple@...dia.com>
---
 mm/khugepaged.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 5f0be13..7eeae33 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -958,8 +958,6 @@ static inline int check_pmd_state(pmd_t *pmd)
 		return SCAN_PMD_NULL;
 	if (pmd_trans_huge(pmde))
 		return SCAN_PMD_MAPPED;
-	if (pmd_devmap(pmde))
-		return SCAN_PMD_NULL;
 	if (pmd_bad(pmde))
 		return SCAN_PMD_NULL;
 	return SCAN_SUCCEED;
-- 
git-series 0.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ