Skip to contentSkip to conversation

mm: disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM

PATCH New [email protected] 1 participant 1 message May 27, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 19/19 mm: disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM

From: Gavin Shan <[email protected]>
Subject: mm: disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM

When we have !NO_BOOTMEM, the deferred page struct initialization doesn't work well because the pages reserved in bootmem are released to the page allocator uncoditionally. It causes memory corruption and system crash eventually.

As Mel suggested, the bootmem is retiring slowly. We fix the issue by simply hiding DEFERRED_STRUCT_PAGE_INIT when bootmem is enabled.

---

 mm/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/Kconfig renamed from mm/Kconfig~mm-disable-deferred_struct_page_init-on-no_bootmem +1 -1
diff -puN mm/Kconfig~mm-disable-deferred_struct_page_init-on-no_bootmem mm/Kconfig
@@ -648,7 +648,7 @@ config DEFERRED_STRUCT_PAGE_INIT
 	bool "Defer initialisation of struct pages to kthreads"
 	default n
 	depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
-	depends on MEMORY_HOTPLUG
+	depends on NO_BOOTMEM && MEMORY_HOTPLUG
 	depends on !FLATMEM
 	help
 	  Ordinarily all struct pages are initialised during early boot in a

_