From 2f709c8d65a4a74b137de50d2fd78da707e5b3ea Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 15 Jan 2024 11:13:28 +0000 Subject: [PATCH] Revert "mm: align larger anonymous mappings on THP boundaries" This reverts commit efa7df3e3bb5da8e6abbe37727417f32a37fba47. It causes testing failures due to a lack of entropy in the system, so revert it for now. This has been reported to upstream, hopefully it gets resolved soon there. Bug: 254683164 Link: https://lore.kernel.org/all/CAJuCfpHXLdQy1a2B6xN2d7quTYwg2OoZseYPZTRpU0eHHKD-sQ@mail.gmail.com/ Cc: Suren Baghdasaryan Change-Id: I36bb4981fe7782a63ab90406dead59fea6d2ae42 Signed-off-by: Greg Kroah-Hartman --- mm/mmap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 9fa8bc3f5d47..6d38df54a2fc 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1830,9 +1830,6 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, */ pgoff = 0; get_area = shmem_get_unmapped_area; - } else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { - /* Ensures that larger anonymous mappings are THP aligned. */ - get_area = thp_get_unmapped_area; } addr = get_area(file, addr, len, pgoff, flags);