[PATCH 2/2] arm64: mte: drop the huge zero folio check in __access_remote_tags()

Tal Zussman tz2294 at columbia.edu
Sat Oct 31 13:44:54 PDT 2026


Commit adfb6609c680 ("mm/huge_memory: initialise the tags of the huge
zero folio") added an is_huge_zero_folio() check to the hugetlb branch,
but the huge zero folio is a THP, so it is never reached. It doesn't
need to be checked in the other branch either, as its pages are tagged
by __GFP_ZEROTAGS on allocation. Remove the check.

Signed-off-by: Tal Zussman <tz2294 at columbia.edu>
---
 arch/arm64/kernel/mte.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c
index f8d39e70857e..8615732567e6 100644
--- a/arch/arm64/kernel/mte.c
+++ b/arch/arm64/kernel/mte.c
@@ -483,8 +483,7 @@ static int __access_remote_tags(struct mm_struct *mm, unsigned long addr,
 		}
 
 		if (folio_test_hugetlb(folio))
-			WARN_ON_ONCE(!folio_test_hugetlb_mte_tagged(folio) &&
-				     !is_huge_zero_folio(folio));
+			WARN_ON_ONCE(!folio_test_hugetlb_mte_tagged(folio));
 		else
 			WARN_ON_ONCE(!page_mte_tagged(page) && !is_zero_folio(folio));
 

-- 
2.39.5




More information about the linux-arm-kernel mailing list