All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,surenb@google.com,harry.yoo@oracle.com,00107082@163.com,urezki@gmail.com,akpm@linux-foundation.org
Subject: + lib-test_vmallocc-use-late_initcall-if-built-in-for-init-ordering.patch added to mm-new branch
Date: Mon, 23 Jun 2025 14:53:18 -0700	[thread overview]
Message-ID: <20250623215319.4EEEEC4CEED@smtp.kernel.org> (raw)


The patch titled
     Subject: lib/test_vmalloc.c: use late_initcall() if built-in for init ordering
has been added to the -mm mm-new branch.  Its filename is
     lib-test_vmallocc-use-late_initcall-if-built-in-for-init-ordering.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-test_vmallocc-use-late_initcall-if-built-in-for-init-ordering.patch

This patch will later appear in the mm-new branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews.  Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
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.

Link: https://lkml.kernel.org/r/20250623184035.581229-1-urezki@gmail.com
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Harry Yoo <harry.yoo@oracle.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: David Wang <00107082@163.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/test_vmalloc.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/lib/test_vmalloc.c~lib-test_vmallocc-use-late_initcall-if-built-in-for-init-ordering
+++ a/lib/test_vmalloc.c
@@ -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 urezki@gmail.com are

lib-test_vmallocc-use-late_initcall-if-built-in-for-init-ordering.patch
lib-test_vmallocc-restrict-default-test-mask-to-avoid-test-warnings.patch


                 reply	other threads:[~2025-06-23 21:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250623215319.4EEEEC4CEED@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=00107082@163.com \
    --cc=harry.yoo@oracle.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=surenb@google.com \
    --cc=urezki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.