Skip to contentSkip to conversation

lib-test_vmallocc-use-late_initcall-if-built-in-for-init-ordering.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 10, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: lib/test_vmalloc.c: use late_initcall() if built-in for init ordering
has been removed from the -mm tree. Its filename was
lib-test_vmallocc-use-late_initcall-if-built-in-for-init-ordering.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Uladzislau Rezki (Sony)" <[email protected]>
Subject: lib/test_vmalloc.c: use late_initcall() if built-in for init ordering
Date: Mon, 23 Jun 2025 20:40:34 +0200

When the vmalloc test code is compiled as a built-in, use late_initcall() instead of module_init() to defer a vmalloc test execution until most subsystems are up and running.

It avoids interfering with components that may not yet be initialized at module_init() time. For example, there was a recent report of memory profiling infrastructure not being ready early enough leading to kernel crash.

By using late_initcall() in the built-in case, we ensure the tests are run at a safer point during a boot sequence.

---

 lib/test_vmalloc.c |    4 ++++
 1 file changed, 4 insertions(+)
lib/test_vmalloc.c renamed from lib/test_vmalloc.c~lib-test_vmallocc-use-late_initcall-if-built-in-for-init-ordering +4 -0
@@ -598,7 +598,11 @@ static int __init vmalloc_test_init(void
 	return IS_BUILTIN(CONFIG_TEST_VMALLOC) ? 0:-EAGAIN;
 }
 
+#ifdef MODULE
 module_init(vmalloc_test_init)
+#else
+late_initcall(vmalloc_test_init);
+#endif
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Uladzislau Rezki");

_

Patches currently in -mm which might be from [email protected] are